org.opends.server.types
Class LDAPException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.opends.server.types.OpenDsException
              extended by org.opends.server.types.IdentifiedException
                  extended by org.opends.server.types.LDAPException
All Implemented Interfaces:
java.io.Serializable

@PublicAPI(stability=UNCOMMITTED,
           mayInstantiate=true,
           mayExtend=false,
           mayInvoke=true)
public final class LDAPException
extends IdentifiedException

This class defines an exception that may be thrown if a problem occurs while interacting with an LDAP protocol element.

See Also:
Serialized Form

Constructor Summary
LDAPException(int resultCode, Message message)
          Creates a new LDAP exception with the provided message.
LDAPException(int resultCode, Message errorMessage, Message message)
          Creates a new LDAP exception with the provided message.
LDAPException(int resultCode, Message errorMessage, Message message, DN matchedDN, java.lang.Throwable cause)
          Creates a new LDAP exception with the provided message and root cause.
LDAPException(int resultCode, Message errorMessage, Message message, java.lang.Throwable cause)
          Creates a new LDAP exception with the provided message and root cause.
LDAPException(int resultCode, Message message, java.lang.Throwable cause)
          Creates a new LDAP exception with the provided message and root cause.
 
Method Summary
 Message getErrorMessage()
          Retrieves the server-provided error message for this exception.
 DN getMatchedDN()
          Retrieves the matched DN for this exception.
 int getResultCode()
          Retrieves the LDAP result code associated with this exception.
 
Methods inherited from class org.opends.server.types.OpenDsException
getMessageObject
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPException

public LDAPException(int resultCode,
                     Message message)
Creates a new LDAP exception with the provided message.

Parameters:
resultCode - The LDAP result code associated with this exception.
message - The message that explains the problem that occurred.

LDAPException

public LDAPException(int resultCode,
                     Message errorMessage,
                     Message message)
Creates a new LDAP exception with the provided message.

Parameters:
resultCode - The LDAP result code associated with this exception.
errorMessage - The server-provided error message.
message - The message that explains the problem that occurred.

LDAPException

public LDAPException(int resultCode,
                     Message message,
                     java.lang.Throwable cause)
Creates a new LDAP exception with the provided message and root cause.

Parameters:
resultCode - The LDAP result code associated with this exception.
message - The message that explains the problem that occurred.
cause - The exception that was caught to trigger this exception.

LDAPException

public LDAPException(int resultCode,
                     Message errorMessage,
                     Message message,
                     java.lang.Throwable cause)
Creates a new LDAP exception with the provided message and root cause.

Parameters:
resultCode - The LDAP result code associated with this exception.
errorMessage - The server-provided error message.
message - The message that explains the problem that occurred.
cause - The exception that was caught to trigger this exception.

LDAPException

public LDAPException(int resultCode,
                     Message errorMessage,
                     Message message,
                     DN matchedDN,
                     java.lang.Throwable cause)
Creates a new LDAP exception with the provided message and root cause.

Parameters:
resultCode - The LDAP result code associated with this exception.
errorMessage - The server-provided error message.
message - The message that explains the problem that occurred.
matchedDN - The matched DN returned by the server.
cause - The exception that was caught to trigger this exception.
Method Detail

getResultCode

public int getResultCode()
Retrieves the LDAP result code associated with this exception.

Returns:
The LDAP result code associated with this exception.

getErrorMessage

public Message getErrorMessage()
Retrieves the server-provided error message for this exception.

Returns:
The server-provided error message for this exception, or null if none was given.

getMatchedDN

public DN getMatchedDN()
Retrieves the matched DN for this exception.

Returns:
The matched DN for this exception, or null if there is none.