|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
javax.naming.NamingException
public class NamingException
Superclass of all naming Exceptions.
Can contain extra information about the root cause of this exception
(for example when the original exception was not a subclass of
NamingException), the part of the Name that
could be resolved (including the Object it resolved to)
and the part of the Name that could not be resolved when
the exception occured.
| Field Summary | |
|---|---|
protected Name |
remainingName
If the exception was caused while resolving a Name then
this field contains that part of the name that could not be resolved. |
protected Name |
resolvedName
If the exception was caused while resolving a Name then
this field contains that part of the name that could be resolved. |
protected Object |
resolvedObj
If the exception was caused while resolving a Name then
this field contains the object that part of the name could be resolved to. |
protected Throwable |
rootException
The root cause of this exception. |
| Constructor Summary | |
|---|---|
NamingException()
Creates a new NamingException without a message. |
|
NamingException(String msg)
Creates a new NamingException with a detailed message. |
|
| Method Summary | |
|---|---|
void |
appendRemainingComponent(String name)
Adds the given String to the remainingName field. |
void |
appendRemainingName(Name name)
Adds the given Name to the remainingName field. |
String |
getExplanation()
Gets the message given to the constructor or null if no message was given. |
Name |
getRemainingName()
Gets the part of the name that could not be resolved before this exception happend. |
Name |
getResolvedName()
Gets the part of the name that could be resolved before this exception happend. |
Object |
getResolvedObj()
Gets the Object to which (part of) the name could be resolved before this exception happend. |
Throwable |
getRootCause()
Gets the root cause field rootException of this Exception. |
void |
printStackTrace()
Prints the stacktrace of this exception or of the root cause if not null. |
void |
printStackTrace(PrintStream ps)
Prints the stacktrace of this exception or of the root cause if not null to the given PrintStream. |
void |
printStackTrace(PrintWriter pw)
Prints the stacktrace of this exception or of the root cause if not null to the given PrintWriter. |
void |
setRemainingName(Name name)
Sets the part of the name that could be resolved before this exception happend. |
void |
setResolvedName(Name name)
Sets the part of the name that could be resolved before this exception happend. |
void |
setResolvedObj(Object o)
Sets the Object to which (part of) the name could be resolved before this exception happend. |
void |
setRootCause(Throwable e)
Sets the root cause field rootException of this Exception. |
String |
toString()
Returns a string representation of this exception. |
String |
toString(boolean objectInfo)
Returns a String representation of this exception and possibly including the part object that could be resolved if the given flag is set to true. |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Throwable rootException
setRootCause(), can be accessed by calling
getRootCause().
protected Name resolvedName
Name then
this field contains that part of the name that could be resolved.
Field might be null. Set by calling setResolvedName().
Can be accessed by calling getResolvedName.
protected Object resolvedObj
Name then
this field contains the object that part of the name could be resolved to.
Field might be null. Set by calling setResolvedObj().
Can be accessed by calling getResolvedObj.
protected Name remainingName
Name then
this field contains that part of the name that could not be resolved.
Field might be null. Set by calling setRemainingName().
The field can be extended by calling appendRemainingName()
or appendRemainingComponent().
Can be accessed by calling getRemainingName.
| Constructor Detail |
|---|
public NamingException()
rootException, resolvedName,
resolvedObj or remainingObject fields.
These fields can be set later.
public NamingException(String msg)
rootException, resolvedName,
resolvedObj or remainingObject, fields.
These fields can be set later.
| Method Detail |
|---|
public Throwable getRootCause()
rootException of this Exception.
public void setRootCause(Throwable e)
rootException of this Exception.
public Name getResolvedName()
resolvedName field of this Exception.
public void setResolvedName(Name name)
resolvedName field of this Exception.
public Object getResolvedObj()
resolvedObj field of this
Exception.
public void setResolvedObj(Object o)
resolvedObj field of this
Exception.
public Name getRemainingName()
remainingName field of this Exception.
public void setRemainingName(Name name)
resolvedName field of this Exception.
The field can be extended by calling appendRemainingName()
or appendRemainingComponent().
public void appendRemainingName(Name name)
Name to the remainingName field.
Does nothing when name is null or when a
InvalidNameException is thrown when adding the name.
Name.addAll(Name)public void appendRemainingComponent(String name)
String to the remainingName field.
Does nothing when name is null or when a
InvalidNameException is thrown when adding the component.
Name.add(String)public String getExplanation()
Throwable.getMessage()public String toString(boolean objectInfo)
public String toString()
toString(false).
toString in class ThrowableObject.getClass(),
Object.hashCode(),
Class.getName(),
Integer.toHexString(int)public void printStackTrace()
printStackTrace in class Throwablepublic void printStackTrace(PrintStream ps)
PrintStream.
printStackTrace in class Throwableps - the PrintStream to write the trace topublic void printStackTrace(PrintWriter pw)
PrintWriter.
printStackTrace in class Throwablepw - the PrintWriter to write the trace to
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||