javax.naming
Class LinkException

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable 
      extended by java.lang.Exception sample code for java.lang.Exception definition code for java.lang.Exception 
          extended by javax.naming.NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException 
              extended by javax.naming.LinkException
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable
Direct Known Subclasses:
LinkLoopException sample code for javax.naming.LinkLoopException definition code for javax.naming.LinkLoopException , MalformedLinkException sample code for javax.naming.MalformedLinkException definition code for javax.naming.MalformedLinkException

public class LinkException
extends NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException

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.

Since:
1.3
See Also:
Context.lookupLink(javax.naming.Name) sample code for javax.naming.Context.lookupLink(javax.naming.Name) definition code for javax.naming.Context.lookupLink(javax.naming.Name) , LinkRef sample code for javax.naming.LinkRef definition code for javax.naming.LinkRef , Serialized Form

Field Summary
protected  String sample code for java.lang.String definition code for java.lang.String linkExplanation sample code for javax.naming.LinkException.linkExplanation definition code for javax.naming.LinkException.linkExplanation
          Contains the exception of why resolution of the link failed.
protected  Name sample code for javax.naming.Name definition code for javax.naming.Name linkRemainingName sample code for javax.naming.LinkException.linkRemainingName definition code for javax.naming.LinkException.linkRemainingName
          Contains the remaining link name that has not been resolved yet.
protected  Name sample code for javax.naming.Name definition code for javax.naming.Name linkResolvedName sample code for javax.naming.LinkException.linkResolvedName definition code for javax.naming.LinkException.linkResolvedName
          Contains the part of the link that has been successfully resolved.
protected  Object sample code for java.lang.Object definition code for java.lang.Object linkResolvedObj sample code for javax.naming.LinkException.linkResolvedObj definition code for javax.naming.LinkException.linkResolvedObj
          Contains the object to which resolution of the part of the link was successful.
 
Fields inherited from class javax.naming.NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException
remainingName sample code for javax.naming.NamingException.remainingName definition code for javax.naming.NamingException.remainingName , resolvedName sample code for javax.naming.NamingException.resolvedName definition code for javax.naming.NamingException.resolvedName , resolvedObj sample code for javax.naming.NamingException.resolvedObj definition code for javax.naming.NamingException.resolvedObj , rootException sample code for javax.naming.NamingException.rootException definition code for javax.naming.NamingException.rootException
 
Constructor Summary
LinkException sample code for javax.naming.LinkException.LinkException() definition code for javax.naming.LinkException.LinkException() ()
          Constructs a new instance of LinkException.
LinkException sample code for javax.naming.LinkException.LinkException(java.lang.String) definition code for javax.naming.LinkException.LinkException(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  explanation)
          Constructs a new instance of LinkException with an explanation All the other fields are initialized to null.
 
Method Summary
 String sample code for java.lang.String definition code for java.lang.String getLinkExplanation sample code for javax.naming.LinkException.getLinkExplanation() definition code for javax.naming.LinkException.getLinkExplanation() ()
          Retrieves the explanation associated with the problem encounter when resolving a link.
 Name sample code for javax.naming.Name definition code for javax.naming.Name getLinkRemainingName sample code for javax.naming.LinkException.getLinkRemainingName() definition code for javax.naming.LinkException.getLinkRemainingName() ()
          Retrieves the remaining unresolved portion of the link name.
 Name sample code for javax.naming.Name definition code for javax.naming.Name getLinkResolvedName sample code for javax.naming.LinkException.getLinkResolvedName() definition code for javax.naming.LinkException.getLinkResolvedName() ()
          Retrieves the leading portion of the link name that was resolved successfully.
 Object sample code for java.lang.Object definition code for java.lang.Object getLinkResolvedObj sample code for javax.naming.LinkException.getLinkResolvedObj() definition code for javax.naming.LinkException.getLinkResolvedObj() ()
          Retrieves the object to which resolution was successful.
 void setLinkExplanation sample code for javax.naming.LinkException.setLinkExplanation(java.lang.String) definition code for javax.naming.LinkException.setLinkExplanation(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  msg)
          Sets the explanation associated with the problem encounter when resolving a link.
 void setLinkRemainingName sample code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Sets the remaining link name field of this exception.
 void setLinkResolvedName sample code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name) (Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
          Sets the resolved link name field of this exception.
 void setLinkResolvedObj sample code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object) definition code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  obj)
          Sets the link resolved object field of this exception.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.naming.LinkException.toString() definition code for javax.naming.LinkException.toString() ()
          Generates the string representation of this exception.
 String sample code for java.lang.String definition code for java.lang.String toString sample code for javax.naming.LinkException.toString(boolean) definition code for javax.naming.LinkException.toString(boolean) (boolean detail)
          Generates the string representation of this exception.
 
Methods inherited from class javax.naming.NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException
appendRemainingComponent sample code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) definition code for javax.naming.NamingException.appendRemainingComponent(java.lang.String) , appendRemainingName sample code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.appendRemainingName(javax.naming.Name) , getCause sample code for javax.naming.NamingException.getCause() definition code for javax.naming.NamingException.getCause() , getExplanation sample code for javax.naming.NamingException.getExplanation() definition code for javax.naming.NamingException.getExplanation() , getRemainingName sample code for javax.naming.NamingException.getRemainingName() definition code for javax.naming.NamingException.getRemainingName() , getResolvedName sample code for javax.naming.NamingException.getResolvedName() definition code for javax.naming.NamingException.getResolvedName() , getResolvedObj sample code for javax.naming.NamingException.getResolvedObj() definition code for javax.naming.NamingException.getResolvedObj() , getRootCause sample code for javax.naming.NamingException.getRootCause() definition code for javax.naming.NamingException.getRootCause() , initCause sample code for javax.naming.NamingException.initCause(java.lang.Throwable) definition code for javax.naming.NamingException.initCause(java.lang.Throwable) , setRemainingName sample code for javax.naming.NamingException.setRemainingName(javax.naming.Name) definition code for javax.naming.NamingException.setRemainingName(javax.naming.Name) , setResolvedName sample code for javax.naming.NamingException.setResolvedName(javax.naming.Name) definition code for javax.naming.NamingException.setResolvedName(javax.naming.Name) , setResolvedObj sample code for javax.naming.NamingException.setResolvedObj(java.lang.Object) definition code for javax.naming.NamingException.setResolvedObj(java.lang.Object) , setRootCause sample code for javax.naming.NamingException.setRootCause(java.lang.Throwable) definition code for javax.naming.NamingException.setRootCause(java.lang.Throwable)
 
Methods inherited from class java.lang.Throwable sample code for java.lang.Throwable definition code for java.lang.Throwable
fillInStackTrace sample code for java.lang.Throwable.fillInStackTrace() definition code for java.lang.Throwable.fillInStackTrace() , getLocalizedMessage sample code for java.lang.Throwable.getLocalizedMessage() definition code for java.lang.Throwable.getLocalizedMessage() , getMessage sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage() , getStackTrace sample code for java.lang.Throwable.getStackTrace() definition code for java.lang.Throwable.getStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace() definition code for java.lang.Throwable.printStackTrace() , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintStream) definition code for java.lang.Throwable.printStackTrace(java.io.PrintStream) , printStackTrace sample code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) definition code for java.lang.Throwable.printStackTrace(java.io.PrintWriter) , setStackTrace sample code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[]) definition code for java.lang.Throwable.setStackTrace(java.lang.StackTraceElement[])
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Field Detail

linkResolvedName sample code for javax.naming.LinkException.linkResolvedName

protected Name sample code for javax.naming.Name definition code for javax.naming.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.

See Also:
getLinkResolvedName() sample code for javax.naming.LinkException.getLinkResolvedName() definition code for javax.naming.LinkException.getLinkResolvedName() , setLinkResolvedName(javax.naming.Name) sample code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name)

linkResolvedObj sample code for javax.naming.LinkException.linkResolvedObj

protected Object sample code for java.lang.Object definition code for java.lang.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.

See Also:
getLinkResolvedObj() sample code for javax.naming.LinkException.getLinkResolvedObj() definition code for javax.naming.LinkException.getLinkResolvedObj() , setLinkResolvedObj(java.lang.Object) sample code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object) definition code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object)

linkRemainingName sample code for javax.naming.LinkException.linkRemainingName

protected Name sample code for javax.naming.Name definition code for javax.naming.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.

See Also:
getLinkRemainingName() sample code for javax.naming.LinkException.getLinkRemainingName() definition code for javax.naming.LinkException.getLinkRemainingName() , setLinkRemainingName(javax.naming.Name) sample code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name)

linkExplanation sample code for javax.naming.LinkException.linkExplanation

protected String sample code for java.lang.String definition code for java.lang.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.

See Also:
getLinkExplanation() sample code for javax.naming.LinkException.getLinkExplanation() definition code for javax.naming.LinkException.getLinkExplanation() , setLinkExplanation(java.lang.String) sample code for javax.naming.LinkException.setLinkExplanation(java.lang.String) definition code for javax.naming.LinkException.setLinkExplanation(java.lang.String)
Constructor Detail

LinkException sample code for javax.naming.LinkException(java.lang.String) definition code for javax.naming.LinkException(java.lang.String)

public LinkException(String sample code for java.lang.String definition code for java.lang.String  explanation)
Constructs a new instance of LinkException with an explanation All the other fields are initialized to null.

Parameters:
explanation - A possibly null string containing additional detail about this exception.
See Also:
Throwable.getMessage() sample code for java.lang.Throwable.getMessage() definition code for java.lang.Throwable.getMessage()

LinkException sample code for javax.naming.LinkException() definition code for javax.naming.LinkException()

public LinkException()
Constructs a new instance of LinkException. All the non-link-related and link-related fields are initialized to null.

Method Detail

getLinkResolvedName sample code for javax.naming.LinkException.getLinkResolvedName() definition code for javax.naming.LinkException.getLinkResolvedName()

public Name sample code for javax.naming.Name definition code for javax.naming.Name  getLinkResolvedName()
Retrieves the leading portion of the link name that was resolved successfully.

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.
See Also:
getLinkResolvedObj() sample code for javax.naming.LinkException.getLinkResolvedObj() definition code for javax.naming.LinkException.getLinkResolvedObj() , setLinkResolvedName(javax.naming.Name) sample code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name)

getLinkRemainingName sample code for javax.naming.LinkException.getLinkRemainingName() definition code for javax.naming.LinkException.getLinkRemainingName()

public Name sample code for javax.naming.Name definition code for javax.naming.Name  getLinkRemainingName()
Retrieves the remaining unresolved portion of the link 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.
See Also:
setLinkRemainingName(javax.naming.Name) sample code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name)

getLinkResolvedObj sample code for javax.naming.LinkException.getLinkResolvedObj() definition code for javax.naming.LinkException.getLinkResolvedObj()

public Object sample code for java.lang.Object definition code for java.lang.Object  getLinkResolvedObj()
Retrieves the object to which resolution was successful. This is the object to which the resolved link name is bound.

Returns:
The possibly null object that was resolved so far. If null, it means the link resolved object field has not been set.
See Also:
getLinkResolvedName() sample code for javax.naming.LinkException.getLinkResolvedName() definition code for javax.naming.LinkException.getLinkResolvedName() , setLinkResolvedObj(java.lang.Object) sample code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object) definition code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object)

getLinkExplanation sample code for javax.naming.LinkException.getLinkExplanation() definition code for javax.naming.LinkException.getLinkExplanation()

public String sample code for java.lang.String definition code for java.lang.String  getLinkExplanation()
Retrieves the explanation associated with the problem encounter when resolving a link.

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.
See Also:
setLinkExplanation(java.lang.String) sample code for javax.naming.LinkException.setLinkExplanation(java.lang.String) definition code for javax.naming.LinkException.setLinkExplanation(java.lang.String)

setLinkExplanation sample code for javax.naming.LinkException.setLinkExplanation(java.lang.String) definition code for javax.naming.LinkException.setLinkExplanation(java.lang.String)

public void setLinkExplanation(String sample code for java.lang.String definition code for java.lang.String  msg)
Sets the explanation associated with the problem encounter when resolving a link.

Parameters:
msg - The possibly null detail string explaining more about the problem with resolving a link. If null, it means no detail will be recorded.
See Also:
getLinkExplanation() sample code for javax.naming.LinkException.getLinkExplanation() definition code for javax.naming.LinkException.getLinkExplanation()

setLinkResolvedName sample code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkResolvedName(javax.naming.Name)

public void setLinkResolvedName(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
Sets the resolved link name field of this exception.

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.

Parameters:
name - The name to set resolved link name to. This can be null. If null, it sets the link resolved name field to null.
See Also:
getLinkResolvedName() sample code for javax.naming.LinkException.getLinkResolvedName() definition code for javax.naming.LinkException.getLinkResolvedName()

setLinkRemainingName sample code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name) definition code for javax.naming.LinkException.setLinkRemainingName(javax.naming.Name)

public void setLinkRemainingName(Name sample code for javax.naming.Name definition code for javax.naming.Name  name)
Sets the remaining link name field of this exception.

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.

Parameters:
name - The name to set remaining link name to. This can be null. If null, it sets the remaining name field to null.
See Also:
getLinkRemainingName() sample code for javax.naming.LinkException.getLinkRemainingName() definition code for javax.naming.LinkException.getLinkRemainingName()

setLinkResolvedObj sample code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object) definition code for javax.naming.LinkException.setLinkResolvedObj(java.lang.Object)

public void setLinkResolvedObj(Object sample code for java.lang.Object definition code for java.lang.Object  obj)
Sets the link resolved object field of this exception. This indicates the last successfully resolved object of link name.

Parameters:
obj - The object to set link resolved object to. This can be null. If null, the link resolved object field is set to null.
See Also:
getLinkResolvedObj() sample code for javax.naming.LinkException.getLinkResolvedObj() definition code for javax.naming.LinkException.getLinkResolvedObj()

toString sample code for javax.naming.LinkException.toString() definition code for javax.naming.LinkException.toString()

public String sample code for java.lang.String definition code for java.lang.String  toString()
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.

Overrides:
toString sample code for javax.naming.NamingException.toString() definition code for javax.naming.NamingException.toString() in class NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException
Returns:
The non-null string representation of this link exception.

toString sample code for javax.naming.LinkException.toString(boolean) definition code for javax.naming.LinkException.toString(boolean)

public String sample code for java.lang.String definition code for java.lang.String  toString(boolean detail)
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.

Overrides:
toString sample code for javax.naming.NamingException.toString(boolean) definition code for javax.naming.NamingException.toString(boolean) in class NamingException sample code for javax.naming.NamingException definition code for javax.naming.NamingException
Parameters:
detail - If true, add information about the link resolved object.
Returns:
The non-null string representation of this link exception.