|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception javax.naming.NamingException javax.naming.LinkException
public class LinkException
This exception is used to describe problems encounter while resolving links. Addition information is added to the base NamingException for pinpointing the problem with the link.
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 FormField Summary | |
---|---|
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. |
Fields inherited from class javax.naming.NamingException |
---|
remainingName, resolvedName, resolvedObj, rootException |
Constructor Summary | |
---|---|
LinkException()
Constructs a new instance of LinkException. |
|
LinkException(String explanation)
Constructs a new instance of LinkException with an explanation All the other fields are initialized to null. |
Method Summary | |
---|---|
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 msg)
Sets the explanation associated with the problem encounter when resolving a link. |
void |
setLinkRemainingName(Name name)
Sets the remaining link name field of this exception. |
void |
setLinkResolvedName(Name name)
Sets the resolved link name field of this exception. |
void |
setLinkResolvedObj(Object obj)
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. |
Methods inherited from class javax.naming.NamingException |
---|
appendRemainingComponent, appendRemainingName, getCause, getExplanation, getRemainingName, getResolvedName, getResolvedObj, getRootCause, initCause, setRemainingName, setResolvedName, setResolvedObj, setRootCause |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Name linkResolvedName
getLinkResolvedName()
,
setLinkResolvedName(javax.naming.Name)
protected Object linkResolvedObj
getLinkResolvedObj()
,
setLinkResolvedObj(java.lang.Object)
protected Name linkRemainingName
getLinkRemainingName()
,
setLinkRemainingName(javax.naming.Name)
protected String linkExplanation
getLinkExplanation()
,
setLinkExplanation(java.lang.String)
Constructor Detail |
---|
public LinkException(String explanation)
explanation
- A possibly null string containing additional
detail about this exception.Throwable.getMessage()
public LinkException()
Method Detail |
---|
public Name getLinkResolvedName()
getLinkResolvedObj()
,
setLinkResolvedName(javax.naming.Name)
public Name getLinkRemainingName()
setLinkRemainingName(javax.naming.Name)
public Object getLinkResolvedObj()
getLinkResolvedName()
,
setLinkResolvedObj(java.lang.Object)
public String getLinkExplanation()
setLinkExplanation(java.lang.String)
public void setLinkExplanation(String msg)
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(Name name)
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(Name name)
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(Object obj)
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 String toString()
toString
in class NamingException
public String toString(boolean detail)
toString
in class NamingException
detail
- If true, add information about the link resolved
object.
|
Java™ Platform Standard Ed. 6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.