All Packages Class Hierarchy This Package Previous Next Index
Class java.naming.NamingException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.naming.NamingException
- public class NamingException
- extends Exception
NamingException is the superclass of all exceptions thrown by
operations in the Context interface.
The nature of the failure is described by the name of the subclass.
This exception captures the information pinpointing where the operation
failed, such as where resolution last proceeded to.
-
remainingName
-
-
resolvedName
-
-
resolvedObj
-
-
rootException
-
-
NamingException()
- Constructs a new NamingException.
-
NamingException(Name, Object, Name)
- Constructs a new NamingException.
-
NamingException(Name, Object, Name, String)
- Constructs a new NamingException.
-
NamingException(String)
- Constructs a new NamingException.
-
appendRemainingComponent(String)
- Add name as the last component in remaining name.
-
appendRemainingName(Name)
- Add components from 'name' as the last components in remaining name.
-
getExplanation()
- Retrieves the explanation associated with this exception.
-
getRemainingName()
- Retrieves the remaining unresolved portion of the name.
-
getResolvedName()
- Retrieves the leading portion of the name that was resolved
successfully.
-
getResolvedObj()
- Retrieves the object to which resolution was successful.
-
getRootCause(Exception)
- Retrieves the root cause of this NamingException, if any.
-
setRemainingName(Name)
- Sets the remaining name field of this exception.
-
setResolvedName(Name)
- Sets the resolved name field of this exception.
-
setResolvedObj(Object)
- Sets the resolved object field of this exception.
-
setRootCause(Throwable)
- Records that exception 'e' is the root cause of this NamingException.
-
toString()
- Generates the string representation of this exception.
-
toString(boolean)
- Generates the string representation in more detail.
resolvedName
protected Name resolvedName
resolvedObj
protected Object resolvedObj
remainingName
protected Name remainingName
rootException
protected Throwable rootException
NamingException
public NamingException(Name resolvedName,
Object resolvedObj,
Name remainingName,
String explanation)
- Constructs a new NamingException.
null is an acceptable value for any of the parameters.
- Parameters:
- resolvedName - The part of the name that has been
successfully resolved.
- resolvedObj - The object to which resolution was successful.
- remainingName - The remaining unresolved portion of the name.
- explanation - Additional detail about this exception.
NamingException
public NamingException(Name resolvedName,
Object resolvedObj,
Name remainingName)
- Constructs a new NamingException.
null is an acceptable value for any of the parameters.
- Parameters:
- resolvedName - The part of the name that has been
successfully resolved.
- resolvedObj - The object to which resolution was successful.
- remainingName - The remaining unresolved portion of the name.
NamingException
public NamingException(String explanation)
- Constructs a new NamingException.
- Parameters:
- explanation - Additional detail about this exception.
NamingException
public NamingException()
- Constructs a new NamingException.
getResolvedName
public Name getResolvedName()
- Retrieves the leading portion of the name that was resolved
successfully.
- Returns:
- The part of the name that was resolved successfully.
- See Also:
- getResolvedObj, setResolvedName
getRemainingName
public Name getRemainingName()
- Retrieves the remaining unresolved portion of the name.
- Returns:
- The part of the name that has not been resolved.
- See Also:
- setRemainingName, appendRemainingName, appendRemainingComponent
getResolvedObj
public Object getResolvedObj()
- Retrieves the object to which resolution was successful.
This is the object to which the resolved name is bound.
- Returns:
- The object that was resolved so far.
- See Also:
- getResolvedName, setResolvedObj
getExplanation
public String getExplanation()
- Retrieves the explanation associated with this exception.
- Returns:
- The detail string explaining more about this exception.
- See Also:
- getMesssage
setResolvedName
public void setResolvedName(Name name)
- Sets the resolved name field of this exception.
- Parameters:
- name - The name to set resolved name to.
- See Also:
- getResolvedName
setRemainingName
public void setRemainingName(Name name)
- Sets the remaining name field of this exception.
- Parameters:
- name - The name to set remaining name to.
- See Also:
- getRemainingName, appendRemainingName, appendRemainingComponent
setResolvedObj
public void setResolvedObj(Object obj)
- Sets the resolved object field of this exception.
- Parameters:
- obj - The object to set resolved object to.
- See Also:
- getResolvedObj
appendRemainingComponent
public void appendRemainingComponent(String name)
- Add name as the last component in remaining name.
- Parameters:
- name - The component to add.
appendRemainingName
public void appendRemainingName(Name name)
- Add components from 'name' as the last components in remaining name.
- Parameters:
- name - The ordered components to add.
getRootCause
public Throwable getRootCause(Exception e)
- 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 want to use the NamingException structure
to indicate how far the naming operation proceeded.
- Returns:
- The exception that caused this naming exception.
setRootCause
public void setRootCause(Throwable e)
- Records that exception 'e' is the root cause of this NamingException.
- Parameters:
- e - The exception that caused the naming operation to fail.
toString
public String toString()
- Generates the string representation of this exception.
- Returns:
- The string representation of this exception.
- Overrides:
- toString in class Throwable
toString
public String toString(boolean detail)
- Generates the string representation in more detail.
- Parameters:
- detail - If true, include details about the resolved object
in addition to the other information.
All Packages Class Hierarchy This Package Previous Next Index