Analogously to how NamingException captures name resolution information, LinkException captures "link"-name resolution information pinpointing the problem encountered while resolving a link. All these fields may be null.
A LinkException instance is not synchronized against concurrent multithreaded access. Multiple threads trying to access and modify a single LinkException instance should lock the object.
Context#lookupLink, LinkRef
| Modifier and Type | Field and Description |
|---|---|
| protected String | linkExplanation
Contains the exception of why resolution of the link failed. |
| protected Name | linkRemainingName
Contains the remaining link name that has not been resolved yet. |
| protected Name | linkResolvedName
Contains the part of the link that has been successfully resolved. |
| protected Object | linkResolvedObj
Contains the object to which resolution of the part of the link was successful. |
| private static final long | serialVersionUID
Use serialVersionUID from JNDI 1.1.1 for interoperability
|
| Access | Constructor and Description |
|---|---|
| public | LinkException(String
A possibly null string containing additional
detail about this exception. explanation)Constructs a new instance of LinkException with an explanation. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The possibly null detail string explaining more about the problem with resolving a link. If null, it means there is no link detail message for this exception.Retrieves the explanation associated with the problem encountered when resolving a link. |
| public Name | Returns: The part of the link name that has not been resolved. It is a composite name. It can be null, which means the link remaining name field has not been set.Retrieves the remaining unresolved portion of the link name. |
| public Name | Returns: The part of the link name that was resolved successfully. It is a composite name. It can be null, which means the link resolved name field has not been set.Retrieves the leading portion of the link name that was resolved successfully. |
| public Object | Returns: The possibly null object that was resolved so far. If null, it means the link resolved object field has not been set.Retrieves the object to which resolution was successful. |
| public void | setLinkExplanation(String
The possibly null detail string explaining more about the problem
with resolving a link. If null, it means no detail will be recorded. msg)Sets the explanation associated with the problem encountered when resolving a link. |
| public void | setLinkRemainingName(Name
The name to set remaining link name to. This can be null.
If null, it sets the remaining name field to null. name)Sets the remaining link name field of this exception. |
| public void | setLinkResolvedName(Name
The name to set resolved link name to. This can be null.
If null, it sets the link resolved name field to null. name)Sets the resolved link name field of this exception. |
| public void | setLinkResolvedObj(Object
The object to set link resolved object to. This can be null.
If null, the link resolved object field is set to null. obj)Sets the link resolved object field of this exception. |
| public String | Returns: The non-null string representation of this link exception.Overrides javax. Generates the string representation of this exception. |
| public String | Returns: The non-null string representation of this link exception.If true, add information about the link resolved
object. detail)Overrides javax. Generates the string representation of this exception. |
| linkExplanation | back to summary |
|---|---|
| protected String linkExplanation Contains the exception of why resolution of the link failed. Can be null. This field is initialized by the constructors. You should access and manipulate this field through its get and set methods.
| |
| linkRemainingName | back to summary |
|---|---|
| protected Name linkRemainingName Contains the remaining link 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 and set methods.
| |
| linkResolvedName | back to summary |
|---|---|
| protected Name linkResolvedName Contains the part of the link 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.
| |
| linkResolvedObj | back to summary |
|---|---|
| protected Object linkResolvedObj Contains the object to which resolution of the part of the link 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.
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides javax. Use serialVersionUID from JNDI 1.1.1 for interoperability | |
| LinkException | back to summary |
|---|---|
| public LinkException(String explanation) Constructs a new instance of LinkException with an explanation. All the other fields are initialized to null.
| |
| LinkException | back to summary |
|---|---|
| public LinkException() Constructs a new instance of LinkException. All the non-link-related and link-related fields are initialized to null. | |
| getLinkExplanation | back to summary |
|---|---|
| public String getLinkExplanation() Retrieves the explanation associated with the problem encountered when resolving a link.
| |
| getLinkRemainingName | back to summary |
|---|---|
| public Name getLinkRemainingName() Retrieves the remaining unresolved portion of the link name.
| |
| getLinkResolvedName | back to summary |
|---|---|
| public Name getLinkResolvedName() Retrieves the leading portion of the link name that was resolved successfully.
| |
| getLinkResolvedObj | back to summary |
|---|---|
| public Object getLinkResolvedObj() Retrieves the object to which resolution was successful. This is the object to which the resolved link name is bound.
| |
| setLinkExplanation | back to summary |
|---|---|
| public void setLinkExplanation(String msg) Sets the explanation associated with the problem encountered when resolving a link.
| |
| setLinkRemainingName | back to summary |
|---|---|
| public void setLinkRemainingName(Name name) Sets the remaining link name field of this exception.
A copy of
| |
| setLinkResolvedName | back to summary |
|---|---|
| public void setLinkResolvedName(Name name) Sets the resolved link name field of this exception.
A copy of
| |
| setLinkResolvedObj | back to summary |
|---|---|
| public void setLinkResolvedObj(Object obj) Sets the link resolved object field of this exception. This indicates the last successfully resolved object of link name.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides javax. Generates the string representation of this exception. This string consists of the NamingException information plus the link's remaining name. This string is used for debugging and not meant to be interpreted programmatically.
| |
| toString | back to summary |
|---|---|
| public String toString(boolean detail) Overrides javax. Generates the string representation of this exception. This string consists of the NamingException information plus the additional information of resolving the link. If 'detail' is true, the string also contains information on the link resolved object. If false, this method is the same as the form of toString() that accepts no parameters. This string is used for debugging and not meant to be interpreted programmatically.
| |