| java.lang.Object java.lang.Throwable java.lang.Exception javax.naming.NamingException
All known Subclasses: javax.naming.NoInitialContextException, javax.naming.InterruptedNamingException, javax.naming.directory.InvalidAttributeValueException, javax.naming.InvalidNameException, javax.naming.directory.SchemaViolationException, javax.naming.ConfigurationException, javax.naming.OperationNotSupportedException, javax.naming.directory.InvalidSearchControlsException, javax.naming.NamingSecurityException, javax.naming.CommunicationException, javax.naming.directory.InvalidAttributeIdentifierException, javax.naming.directory.NoSuchAttributeException, javax.naming.NotContextException, javax.naming.LinkException, javax.naming.ServiceUnavailableException, javax.naming.directory.AttributeInUseException, javax.naming.InsufficientResourcesException, javax.naming.ReferralException, javax.naming.directory.AttributeModificationException, javax.naming.PartialResultException, javax.naming.directory.InvalidSearchFilterException, javax.naming.CannotProceedException, javax.naming.NameAlreadyBoundException, javax.naming.ContextNotEmptyException, javax.naming.LimitExceededException, javax.naming.directory.InvalidAttributesException, javax.naming.NameNotFoundException,
NamingException | public class NamingException extends Exception (Code) | | A NamingException is the basic exception thrown by the naming
classes. There are numerous subclasses of it which are used to further
describe the type of error encountered.
A NamingException can hold information relating to an error
encountered when trying to resolve a Name . It holds the two
parts of the original name, firstly the part of the name which was
successfully resolved, secondly the part of the name which could not be
resolved.
For example:
------------
The resolved name could be something like http://www.apache.org where jndi
has successfully resolved the DNS name. The part of the name which could not
be resolved could be something like java/classes.index.html where jndi could
not resolve the file name.
It can also refer to the object that is associated with the resolved name.
Additionally it can refer to another exception, which may be the root cause
of this exception.
Multithreaded access to a NamingException instance is only
safe when client code locks the object first.
|
Constructor Summary | |
public | NamingException() Constructs a NamingException instance with all data
initialized to null. | public | NamingException(String s) Constructs a NamingException instance with the specified
message. |
remainingName | protected Name remainingName(Code) | | The remaining name. This may be null.
|
resolvedName | protected Name resolvedName(Code) | | The resolved name. This may be null.
|
resolvedObj | protected Object resolvedObj(Code) | | The resolved object. This may be null.
|
rootException | protected Throwable rootException(Code) | | The exception that caused this NamingException to be raised. This may be
null.
|
NamingException | public NamingException()(Code) | | Constructs a NamingException instance with all data
initialized to null.
|
NamingException | public NamingException(String s)(Code) | | Constructs a NamingException instance with the specified
message. All other fields are initialized to null.
Parameters: s - The detail message for the exception. It may be null. |
appendRemainingComponent | public void appendRemainingComponent(String s)(Code) | | Appends the supplied string to the Name held as the
remaining name. The string may be null.
Parameters: s - the string to append to the remaining Name. throws: IllegalArgumentException - if appending the supplied String s causes the name to becomeinvalid. |
appendRemainingName | public void appendRemainingName(Name n)(Code) | | Appends the elements of the supplied Name n to the
Name held as the remaining name. The Name n
may be null or may be empty.
Parameters: n - the name to append to the remaining name. throws: IllegalArgumentException - if appending the supplied Name n causes thename to become invalid. |
getExplanation | public String getExplanation()(Code) | | Returns the message passed in as a param to the constructor. This may be
null.
the message passed in as a param to the constructor. |
getRemainingName | public Name getRemainingName()(Code) | | Returns the remaining name. This may be null.
the remaining name. This may be null. |
getResolvedName | public Name getResolvedName()(Code) | | Returns the resolved name. This may be null.
the resolved name. This may be null. |
getResolvedObj | public Object getResolvedObj()(Code) | | Returns the resolved object. This may be null.
the resolved object. This may be null. |
getRootCause | public Throwable getRootCause()(Code) | | Returns the exception which caused this NamingException
which may be null.
the exception which caused this NamingException which may be null. |
setRemainingName | public void setRemainingName(Name name)(Code) | | Sets the remaining name to the specified n. This may be null. The
remaining name details must not change even if the original
Name itself changes.
Parameters: name - the remaining name to set. |
setResolvedName | public void setResolvedName(Name name)(Code) | | Sets the resolved name to the specified name. This may be null. The
resolved name details must not change even if the original
Name itself changes.
Parameters: name - the resolved name to set. |
setResolvedObj | public void setResolvedObj(Object o)(Code) | | Sets the resolved object to the specified o. This may be null.
Parameters: o - the resolved object to set. |
setRootCause | public void setRootCause(Throwable t)(Code) | | Sets the exception that caused this NamingException . It
may be null. Ignore the supplied parameter if it is actually this
exception.
Parameters: t - the exception that caused this NamingException . |
toString | public String toString(boolean flag)(Code) | | Returns the same details as the toString() method except
that, if the flag is set to true, then details of the
resolved object are also appended to the string. The actual format can be
decided by the implementor.
Parameters: flag - Indicates if the resolved object need to be returned. the string representation of this NamingException . |
toString | public String toString()(Code) | | Returns the string representation of this NamingException .
The string contains the string representation of this exception together
with details of the exception which caused this and any remaining portion
of the Name .
The actual format can be decided by the implementor.
the string |
|
|