A NamingException instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single NamingException instance should lock the object.
This exception has been retrofitted to conform to
the general purpose exception-chaining mechanism. The
root exception (or root cause) is the same object as the
cause returned by the Throwable#getCause() method.
| Modifier and Type | Field and Description |
|---|---|
| protected Name | remainingName
Contains the remaining name that has not been resolved yet. |
| protected Name | resolvedName
Contains the part of the name that has been successfully resolved. |
| protected Object | resolvedObj
Contains the object to which resolution of the part of the name was successful. |
| protected Throwable | rootException
Contains the original exception that caused this NamingException to be thrown. |
| private static final long | serialVersionUID
Use serialVersionUID from JNDI 1.1.1 for interoperability
|
| Access | Constructor and Description |
|---|---|
| public | NamingException(String
A possibly null string containing
additional detail about this exception. explanation)Constructs a new NamingException with an explanation. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | appendRemainingComponent(String
The component to add.
If name is null, this method does not do anything. name)Add name as the last component in remaining name. |
| public void | appendRemainingName(Name
The possibly null name containing ordered components to add.
If name is null, this method does not do anything. name)Add components from 'name' as the last components in remaining name. |
| public Throwable | Returns: the cause of this exception, ornull if the
cause is nonexistent or unknown.Overrides java. Returns the cause of this exception. |
| public String | Returns: The possibly null detail string explaining more about this exception. If null, it means there is no detail message for this exception.Retrieves the explanation associated with this exception. |
| public Name | Returns: The part of the name that has not been resolved. It is a composite name. It can be null, which means the remaining name field has not been set.Retrieves the remaining unresolved portion of the name. |
| public Name | Returns: The part of the name that was resolved successfully. It is a composite name. It can be null, which means the resolved name field has not been set.Retrieves the leading portion of the name that was resolved successfully. |
| public Object | Returns: The possibly null object that was resolved so far. null means that the resolved object field has not been set.Retrieves the object to which resolution was successful. |
| public Throwable | Returns: The possibly null exception that caused this naming exception. If null, it means no root cause has been set for this naming exception.Retrieves the root cause of this NamingException, if any. |
| public Throwable | Returns: a reference to thisNamingException instance.the cause, which is saved for later retrieval by
the cause)getCause() method. A null value
indicates that the cause is nonexistent or unknown.Overrides java. Initializes the cause of this exception to the specified value. |
| public void | setRemainingName(Name
The possibly null name to set remaining name to.
If null, it sets the remaining name field to null. name)Sets the remaining name field of this exception. |
| public void | setResolvedName(Name
The possibly null name to set resolved name to.
If null, it sets the resolved name field to null. name)Sets the resolved name field of this exception. |
| public void | setResolvedObj(Object
The possibly null object to set resolved object to.
If null, the resolved object field is set to null. obj)Sets the resolved object field of this exception. |
| public void | setRootCause(Throwable
The possibly null exception that caused the naming
operation to fail. If null, it means this naming
exception has no root cause. e)Records the root cause of this NamingException. |
| public String | Returns: The non-null string containing the string representation of this exception.Overrides java. Generates the string representation of this exception. |
| public String | Returns: The non-null string containing the string representation.If true, include details about the resolved object
in addition to the other information. detail)Generates the string representation in more detail. |
| remainingName | back to summary |
|---|---|
| protected Name remainingName Contains the remaining name that has not been resolved yet. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get, set, "append" methods. | |
| resolvedName | back to summary |
|---|---|
| protected Name resolvedName Contains the part of the name that has been successfully resolved. It is a composite name and can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
| |
| resolvedObj | back to summary |
|---|---|
| protected Object resolvedObj Contains the object to which resolution of the part of the name was successful. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
| |
| rootException | back to summary |
|---|---|
| protected Throwable rootException Contains the original exception that caused this NamingException to be thrown. This field is set if there is additional information that could be obtained from the original exception, or if the original exception could not be mapped to a subclass of NamingException. Can be null.
This field predates the general-purpose exception chaining facility.
The | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. Use serialVersionUID from JNDI 1.1.1 for interoperability | |
| NamingException | back to summary |
|---|---|
| public NamingException(String explanation) Constructs a new NamingException with an explanation. All unspecified fields are set to null.
| |
| NamingException | back to summary |
|---|---|
| public NamingException() Constructs a new NamingException. All fields are set to null. | |
| appendRemainingComponent | back to summary |
|---|---|
| public void appendRemainingComponent(String name) Add name as the last component in remaining name.
| |
| appendRemainingName | back to summary |
|---|---|
| public void appendRemainingName(Name name) Add components from 'name' as the last components in remaining name.
Subsequent changes to
| |
| getCause | back to summary |
|---|---|
| public Throwable getCause() Overrides java. Returns the cause of this exception. The cause is the
throwable that caused this naming exception to be thrown.
Returns
| |
| getExplanation | back to summary |
|---|---|
| public String getExplanation() Retrieves the explanation associated with this exception.
| |
| getRemainingName | back to summary |
|---|---|
| public Name getRemainingName() Retrieves the remaining unresolved portion of the name.
| |
| getResolvedName | back to summary |
|---|---|
| public Name getResolvedName() Retrieves the leading portion of the name that was resolved successfully.
| |
| getResolvedObj | back to summary |
|---|---|
| public Object getResolvedObj() Retrieves the object to which resolution was successful. This is the object to which the resolved name is bound.
| |
| getRootCause | back to summary |
|---|---|
| public Throwable getRootCause() Retrieves the root cause of this NamingException, if any. The root cause of a naming exception is used when the service provider wants to indicate to the caller a non-naming related exception but at the same time wants to use the NamingException structure to indicate how far the naming operation proceeded.
This method predates the general-purpose exception chaining facility.
The
| |
| initCause | back to summary |
|---|---|
| public Throwable initCause(Throwable cause) Overrides java. Initializes the cause of this exception to the specified value. The cause is the throwable that caused this naming exception to be thrown. This method may be called at most once.
| |
| setRemainingName | back to summary |
|---|---|
| public void setRemainingName(Name name) Sets the remaining name field of this exception.
A copy of
| |
| setResolvedName | back to summary |
|---|---|
| public void setResolvedName(Name name) Sets the resolved name field of this exception.
A copy of
| |
| setResolvedObj | back to summary |
|---|---|
| public void setResolvedObj(Object obj) Sets the resolved object field of this exception.
| |
| setRootCause | back to summary |
|---|---|
| public void setRootCause(Throwable e) Records the root cause of this NamingException.
If
This method predates the general-purpose exception chaining facility.
The
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Generates the string representation of this exception. The string representation consists of this exception's class name, its detailed message, and if it has a root cause, the string representation of the root cause exception, followed by the remaining name (if it is not null). This string is used for debugging and not meant to be interpreted programmatically.
| |
| toString | back to summary |
|---|---|
| public String toString(boolean detail) Generates the string representation in more detail. This string representation consists of the information returned by the toString() that takes no parameters, plus the string representation of the resolved object (if it is not null). This string is used for debugging and not meant to be interpreted programmatically.
| |