public class LinkException extends NamingException
Analogous 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(javax.naming.Name) ,
LinkRef,
Serialized Form
| 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.
|
remainingName, resolvedName, resolvedObj, rootException| Constructor and Description |
|---|
LinkException()
Constructs a new instance of LinkException.
|
LinkException(String
Constructs a new instance of LinkException with an explanation All the other fields are initialized to null.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getLinkExplanation()
Retrieves the explanation associated with the problem encounter when resolving a link.
|
Name |
getLinkRemainingName()
Retrieves the remaining unresolved portion of the link name.
|
Name |
getLinkResolvedName()
Retrieves the leading portion of the link name that was resolved successfully.
|
Object |
getLinkResolvedObj()
Retrieves the object to which resolution was successful.
|
void |
setLinkExplanation(String
Sets the explanation associated with the problem encounter when resolving a link.
|
void |
setLinkRemainingName(Name
Sets the remaining link name field of this exception.
|
void |
setLinkResolvedName(Name
Sets the resolved link name field of this exception.
|
void |
setLinkResolvedObj(Object
Sets the link resolved object field of this exception.
|
String |
toString()
Generates the string representation of this exception.
|
String |
toString(boolean detail)
Generates the string representation of this exception.
|
appendRemainingComponent, appendRemainingName, getCause, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, initCause, setRemainingName, setResolvedName, setResolvedObj, setRootCauseaddSuppressed, fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTraceprotected NamelinkResolvedName
protected ObjectlinkResolvedObj
protected NamelinkRemainingName
protected StringlinkExplanation
public LinkException(Stringexplanation)
explanation - A possibly null string containing additional detail about this exception.
Throwable.getMessage()
public LinkException()
public NamegetLinkResolvedName()
getLinkResolvedObj(),
setLinkResolvedName(javax.naming.Name)
public NamegetLinkRemainingName()
setLinkRemainingName(javax.naming.Name)
public ObjectgetLinkResolvedObj()
getLinkResolvedName(),
setLinkResolvedObj(java.lang.Object)
public StringgetLinkExplanation()
setLinkExplanation(java.lang.String)
public void setLinkExplanation(Stringmsg)
msg - The possibly null detail string explaining more about the problem with resolving a link. If null, it means no detail will be recorded.
getLinkExplanation()
public void setLinkResolvedName(Namename)
name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.
A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.
name - The name to set resolved link name to. This can be null. If null, it sets the link resolved name field to null.
getLinkResolvedName()
public void setLinkRemainingName(Namename)
name is a composite name. If the intent is to set this field using a compound name or string, you must "stringify" the compound name, and create a composite name with a single component using the string. You can then invoke this method using the resulting composite name.
A copy of name is made and stored. Subsequent changes to name does not affect the copy in this NamingException and vice versa.
name - The name to set remaining link name to. This can be null. If null, it sets the remaining name field to null.
getLinkRemainingName()
public void setLinkResolvedObj(Objectobj)
obj - The object to set link resolved object to. This can be null. If null, the link resolved object field is set to null.
getLinkResolvedObj()
public StringtoString()
toString in class
NamingException
public StringtoString(boolean detail)
toString in class
NamingException
detail - If true, add information about the link resolved object.