Package org.springframework.ldap
Class NamingException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.springframework.core.NestedRuntimeException
-
- org.springframework.ldap.NamingException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
AttributeInUseException
,AttributeModificationException
,BadLdapGrammarException
,CannotProceedException
,CommunicationException
,ConfigurationException
,ContextNotEmptyException
,ConverterException
,CreateControlFailedException
,InsufficientResourcesException
,InterruptedNamingException
,InvalidAttributeFormatException
,InvalidAttributeIdentifierException
,InvalidAttributesException
,InvalidAttributeValueException
,InvalidNameException
,InvalidRecordFormatException
,InvalidSearchControlsException
,InvalidSearchFilterException
,LimitExceededException
,LinkException
,NameAlreadyBoundException
,NameNotFoundException
,NamingSecurityException
,NoInitialContextException
,NoSuchAttributeException
,NotContextException
,ObjectRetrievalException
,OdmException
,OperationNotSupportedException
,PartialResultException
,ReferralException
,SchemaViolationException
,ServiceUnavailableException
,UncategorizedLdapException
public abstract class NamingException extends org.springframework.core.NestedRuntimeException
Base class for exception thrown by the framework whenever it encounters a problem related to LDAP.- Since:
- 1.2
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NamingException(java.lang.String msg)
Constructor that takes a message.NamingException(java.lang.String msg, java.lang.Throwable cause)
Constructor that allows a message and a root cause.NamingException(java.lang.Throwable cause)
Constructor that allows a plain root cause, intended for subclasses mirroring correspondingjavax.naming
exceptions.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
getCause()
OverridesThrowable.getCause()
since serialization always tries to serialize the base class before the subclass.java.lang.String
getExplanation()
Convenience method to get the explanation associated with this exception, if the root cause was an instance ofNamingException
.javax.naming.Name
getRemainingName()
Convenience method to get the unresolved part of the name associated with this exception, if the root cause was an instance ofNamingException
.javax.naming.Name
getResolvedName()
Convenience method to get the leading portion of the resolved name associated with this exception, if the root cause was an instance ofNamingException
.java.lang.Object
getResolvedObj()
Convenience method to get the resolved object associated with this exception, if the root cause was an instance ofNamingException
.-
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
-
-
-
-
Constructor Detail
-
NamingException
public NamingException(java.lang.String msg)
Constructor that takes a message.- Parameters:
msg
- the detail message
-
NamingException
public NamingException(java.lang.String msg, java.lang.Throwable cause)
Constructor that allows a message and a root cause.- Parameters:
msg
- the detail messagecause
- the cause of the exception. This argument is generally expected to be a proper subclass ofNamingException
.
-
NamingException
public NamingException(java.lang.Throwable cause)
Constructor that allows a plain root cause, intended for subclasses mirroring correspondingjavax.naming
exceptions.- Parameters:
cause
- the cause of the exception. This argument is generally expected to be a proper subclass ofNamingException
.
-
-
Method Detail
-
getCause
public java.lang.Throwable getCause()
OverridesThrowable.getCause()
since serialization always tries to serialize the base class before the subclass. Our cause may have a resolvedObj that is not serializable. By storing the cause in this class, we get a chance at temporarily nulling the cause before serialization, thus in effect making the current instance serializable.- Overrides:
getCause
in classjava.lang.Throwable
-
getExplanation
public java.lang.String getExplanation()
Convenience method to get the explanation associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- a detail string explaining more about this exception if the root
cause is an instance of javax.naming.NamingException, or
null
if there is no detail message for this exception
-
getRemainingName
public javax.naming.Name getRemainingName()
Convenience method to get the unresolved part of the name associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- a composite name describing the part of the name that has not
been resolved if the root cause is an instance of
javax.naming.NamingException, or
null
if the remaining name field has not been set
-
getResolvedName
public javax.naming.Name getResolvedName()
Convenience method to get the leading portion of the resolved name associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- a composite name describing the the leading portion of the name
that was resolved successfully if the root cause is an instance
of javax.naming.NamingException, or
null
if the resolved name field has not been set
-
getResolvedObj
public java.lang.Object getResolvedObj()
Convenience method to get the resolved object associated with this exception, if the root cause was an instance ofNamingException
.- Returns:
- the object that was resolved so far if the root cause is an
instance of javax.naming.NamingException, or
null
if the resolved object field has not been set
-
-