|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception com.novell.ldap.LDAPException
Thrown to indicate that an LDAP exception has occurred. This is a general exception which includes a message and an LDAP result code.
An LDAPException can result from physical problems (such as network errors) as well as problems with LDAP operations detected by the server. For example, if an LDAP add operation fails because of a duplicate entry, the server returns a result code.
Five possible sources of information are available from LDAPException:
getResultCode
method returns a result code,
which can be compared against standard LDAP result codes. getMessage
method returns a localized message
from the message resource that corresponds to the result code.
getLDAPErrorMessage
method returns any error
message received from the LDAP server.getMatchedDN
method retrieves the part of a
submitted distinguished name which could be matched by the servergetCause
method returns the a nested exception
that was the original cause for the error. The toString
method returns a string containing all
the above sources of information, if they have a value.
Exceptions generated by the API, i.e. that are not a result
of a server response, can be identified as instanceof
LDAPLocalException
The following table lists the standard LDAP result codes. See RFC2251 for a discussion of the meanings of the result codes. The corresponding ASN.1 definition from RFC2251 is provided in parentheses.
Value | Result Code |
0 | SUCCESS (success) |
1 | OPERATIONS_ERROR (operationsError) |
2 | PROTOCOL_ERROR (protocolError) |
3 | TIME_LIMIT_EXCEEDED (timeLimitExceeded) |
4 | SIZE_LIMIT_EXCEEDED (sizeLimitExceeded) |
5 | COMPARE_FALSE (compareFalse) |
6 | COMPARE_TRUE (compareTrue) |
7 | AUTH_METHOD_NOT_SUPPORTED (authMethodNotSupported) |
8 | STRONG_AUTH_REQUIRED (strongAuthRequired) |
10 | REFERRAL (referral) |
11 | ADMIN_LIMIT_EXCEEDED (adminLimitExceeded) |
12 | UNAVAILABLE_CRITICAL_EXTENSION (unavailableCriticalExtension) |
13 | CONFIDENTIALITY_REQUIRED (confidentialityRequired) |
14 | SASL_BIND_IN_PROGRESS (saslBindInProgress) |
16 | NO_SUCH_ATTRIBUTE (noSuchAttribute) |
17 | UNDEFINED_ATTRIBUTE_TYPE (undefinedAttributeType) |
18 | INAPPROPRIATE_MATCHING (inappropriateMatching) |
19 | CONSTRAINT_VIOLATION (constraintViolation) |
20 | ATTRIBUTE_OR_VALUE_EXISTS (AttributeOrValueExists) |
21 | INVALID_ATTRIBUTE_SYNTAX (invalidAttributeSyntax) |
32 | NO_SUCH_OBJECT (noSuchObject) |
33 | ALIAS_PROBLEM (aliasProblem) |
34 | INVALID_DN_SYNTAX (invalidDNSyntax) |
35 | IS_LEAF (isLeaf) |
36 | ALIAS_DEREFERENCING_PROBLEM (aliasDereferencingProblem) |
48 | INAPPROPRIATE_AUTHENTICATION (inappropriateAuthentication) |
49 | INVALID_CREDENTIALS (invalidCredentials) |
50 | INSUFFICIENT_ACCESS_RIGHTS (insufficientAccessRights) |
51 | BUSY (busy) |
52 | UNAVAILABLE (unavailable) |
53 | UNWILLING_TO_PERFORM (unwillingToPerform) |
54 | LOOP_DETECT (loopDetect) |
64 | NAMING_VIOLATION (namingViolation) |
65 | OBJECT_CLASS_VIOLATION (objectClassViolation) |
66 | NOT_ALLOWED_ON_NONLEAF (notAllowedOnNonLeaf) |
67 | NOT_ALLOWED_ON_RDN (notAllowedOnRDN) |
68 | ENTRY_ALREADY_EXISTS (entryAlreadyExists) |
69 | OBJECT_CLASS_MODS_PROHIBITED (objectClassModsProhibited) |
71 | AFFECTS_MULTIPLE_DSAS (affectsMultipleDSAs |
80 | OTHER (other) |
Local errors, resulting from actions other than an operation on a server.
Value | Result Code |
81 | SERVER_DOWN |
82 | LOCAL_ERROR |
83 | ENCODING_ERROR |
84 | DECODING_ERROR |
85 | LDAP_TIMEOUT |
86 | AUTH_UNKNOWN |
87 | FILTER_ERROR |
88 | USER_CANCELLED |
90 | NO_MEMORY |
91 | CONNECT_ERROR |
92 | LDAP_NOT_SUPPORTED |
93 | CONTROL_NOT_FOUND |
94 | NO_RESULTS_RETURNED |
95 | MORE_RESULTS_TO_RETURN |
96 | CLIENT_LOOP |
97 | REFERRAL_LIMIT_EXCEEDED |
100 | INVALID_RESPONSE |
101 | AMBIGUOUS_RESPONSE |
112 | TLS_NOT_SUPPORTED |
Field Summary | |
static int |
ADMIN_LIMIT_EXCEEDED
Indicates that an LDAP server limit set by an administrative authority has been exceeded. |
static int |
AFFECTS_MULTIPLE_DSAS
Indicates that the modify DN operation moves the entry from one LDAP server to another and thus requires more than one LDAP server. |
static int |
ALIAS_DEREFERENCING_PROBLEM
Indicates that during a search operation, either the client does not have access rights to read the aliased object's name or dereferencing is not allowed. |
static int |
ALIAS_PROBLEM
Indicates that an error occurred when an alias was dereferenced. |
static int |
AMBIGUOUS_RESPONSE
Indicates that the server response to a request is ambiguous. |
static int |
ATTRIBUTE_OR_VALUE_EXISTS
Indicates that the attribute value specified in a modify or add operation already exists as a value for that attribute. |
static int |
AUTH_METHOD_NOT_SUPPORTED
Indicates that during a bind operation the client requested an authentication method not supported by the LDAP server. |
static int |
AUTH_UNKNOWN
Indicates that a bind method was called with an unknown authentication method. |
static int |
BUSY
Indicates that the LDAP server is too busy to process the client request at this time, but if the client waits and resubmits the request, the server may be able to process it then. |
static int |
CLIENT_LOOP
Indicates the LDAP libraries detected a loop. |
static int |
COMPARE_FALSE
Does not indicate an error condition. |
static int |
COMPARE_TRUE
Does not indicate an error condition. |
static int |
CONFIDENTIALITY_REQUIRED
Indicates that the session is not protected by a protocol such as Transport Layer Security (TLS), which provides session confidentiality. |
static int |
CONNECT_ERROR
Indicates that the LDAP client has lost either its connection or cannot establish a connection to the LDAP server. |
static int |
CONSTRAINT_VIOLATION
Indicates that the attribute value specified in a modify, add, or modify DN operation violates constraints placed on the attribute. |
static int |
CONTROL_NOT_FOUND
Indicates that the client requested a control that the libraries cannot find in the list of supported controls sent by the LDAP server. |
static int |
DECODING_ERROR
Indicates that the LDAP client encountered errors when decoding an LDAP response from the LDAP server. |
static int |
ENCODING_ERROR
Indicates that the LDAP client encountered errors when encoding an LDAP request intended for the LDAP server. |
static int |
ENTRY_ALREADY_EXISTS
Indicates that the add operation attempted to add an entry that already exists, or that the modify operation attempted to rename an entry to the name of an entry that already exists. |
static int |
FILTER_ERROR
Indicates that the search method was called with an invalid search filter. |
static int |
INAPPROPRIATE_AUTHENTICATION
Indicates that during a bind operation, the client is attempting to use an authentication method that the client cannot use correctly. |
static int |
INAPPROPRIATE_MATCHING
Indicates that the matching rule specified in the search filter does not match a rule defined for the attribute's syntax. |
static int |
INSUFFICIENT_ACCESS_RIGHTS
Indicates that the caller does not have sufficient rights to perform the requested operation. |
static int |
INVALID_ATTRIBUTE_SYNTAX
Indicates that the attribute value specified in an add, compare, or modify operation is an unrecognized or invalid syntax for the attribute. |
static int |
INVALID_CREDENTIALS
Indicates that invalid information was passed during a bind operation. |
static int |
INVALID_DN_SYNTAX
Indicates that the syntax of the DN is incorrect. |
static int |
INVALID_RESPONSE
Indicates that the server response to a request is invalid. |
static int |
IS_LEAF
Indicates that the specified operation cannot be performed on a leaf entry. |
static int |
LDAP_NOT_SUPPORTED
Indicates that the requested functionality is not supported by the client. |
static int |
LDAP_PARTIAL_RESULTS
Returned by some LDAP servers to LDAPv2 clients to indicate that a referral has been returned in the error string. |
static int |
LDAP_TIMEOUT
Indicates that the time limit of the LDAP client was exceeded while waiting for a result. |
static int |
LOCAL_ERROR
Indicates that the LDAP client has an error. |
static int |
LOOP_DETECT
Indicates that the client discovered an alias or referral loop, and is thus unable to complete this request. |
static int |
MORE_RESULTS_TO_RETURN
Indicates that more results are chained in the result message. |
static int |
NAMING_VIOLATION
Indicates that the add or modify DN operation violates the schema's structure rules. |
static int |
NO_MEMORY
Indicates that a dynamic memory allocation method failed when calling an LDAP method. |
static int |
NO_RESULTS_RETURNED
Indicates that the LDAP server sent no results. |
static int |
NO_SUCH_ATTRIBUTE
Indicates that the attribute specified in the modify or compare operation does not exist in the entry. |
static int |
NO_SUCH_OBJECT
Indicates the target object cannot be found. |
static int |
NOT_ALLOWED_ON_NONLEAF
Indicates that the requested operation is permitted only on leaf entries. |
static int |
NOT_ALLOWED_ON_RDN
Indicates that the modify operation attempted to remove an attribute value that forms the entry's relative distinguished name. |
static int |
OBJECT_CLASS_MODS_PROHIBITED
Indicates that the modify operation attempted to modify the structure rules of an object class. |
static int |
OBJECT_CLASS_VIOLATION
Indicates that the add, modify, or modify DN operation violates the object class rules for the entry. |
static int |
OPERATIONS_ERROR
Indicates an internal error. |
static int |
OTHER
Indicates an unknown error condition. |
static int |
PROTOCOL_ERROR
Indicates that the server has received an invalid or malformed request from the client. |
static int |
REFERRAL
Does not indicate an error condition. |
static int |
REFERRAL_LIMIT_EXCEEDED
Indicates that the referral exceeds the hop limit. |
static int |
SASL_BIND_IN_PROGRESS
Does not indicate an error condition, but indicates that the server is ready for the next step in the process. |
static int |
SERVER_DOWN
Indicates that the LDAP libraries cannot establish an initial connection with the LDAP server. |
static int |
SIZE_LIMIT_EXCEEDED
Indicates that in a search operation, the size limit specified by the client or the server has been exceeded. |
static int |
STRONG_AUTH_REQUIRED
Indicates a problem with the level of authentication. |
static int |
SUCCESS
Indicates the requested client operation completed successfully. |
static int |
TIME_LIMIT_EXCEEDED
Indicates that the operation's time limit specified by either the client or the server has been exceeded. |
static int |
TLS_NOT_SUPPORTED
Indicates that TLS is not supported on the server. |
static int |
UNAVAILABLE
Indicates that the LDAP server cannot process the client's bind request, usually because it is shutting down. |
static int |
UNAVAILABLE_CRITICAL_EXTENSION
Indicates that the LDAP server was unable to satisfy a request because one or more critical extensions were not available. |
static int |
UNDEFINED_ATTRIBUTE_TYPE
Indicates that the attribute specified in the modify or add operation does not exist in the LDAP server's schema. |
static int |
UNWILLING_TO_PERFORM
Indicates that the LDAP server cannot process the request because of server-defined restrictions. |
static int |
USER_CANCELLED
Indicates that the user cancelled the LDAP operation. |
Constructor Summary | |
LDAPException()
Constructs a default exception with no specific error information. |
|
LDAPException(java.lang.String messageOrKey,
int resultCode,
java.lang.String serverMsg)
Constructs an exception with a detailed message obtained from the specified MessageOrKey String, the result code,
and a server meessage. |
|
LDAPException(java.lang.String messageOrKey,
int resultCode,
java.lang.String serverMsg,
java.lang.String matchedDN)
Constructs an exception with a detailed message obtained from the specified MessageOrKey String. |
|
LDAPException(java.lang.String messageOrKey,
int resultCode,
java.lang.String serverMsg,
java.lang.Throwable rootException)
Constructs an exception with a detailed message obtained from the specified MessageOrKey String. |
|
LDAPException(java.lang.String messageOrKey,
java.lang.Object[] arguments,
int resultCode,
java.lang.String serverMsg)
Constructs an exception with a detailed message obtained from the specified MessageOrKey String and modifying arguments. |
|
LDAPException(java.lang.String messageOrKey,
java.lang.Object[] arguments,
int resultCode,
java.lang.String serverMsg,
java.lang.String matchedDN)
Constructs an exception with a detailed message obtained from the specified MessageOrKey String and modifying arguments. |
|
LDAPException(java.lang.String messageOrKey,
java.lang.Object[] arguments,
int resultCode,
java.lang.String serverMsg,
java.lang.Throwable rootException)
Constructs an exception with a detailed message obtained from the specified MessageOrKey String and modifying arguments. |
Method Summary | |
java.lang.Throwable |
getCause()
Returns the lower level Exception which caused the failure, if any. |
java.lang.String |
getLDAPErrorMessage()
Returns the error message from the LDAP server, if this message is available (that is, if this message was set). |
java.lang.String |
getLocalizedMessage()
|
java.lang.String |
getMatchedDN()
Returns the part of a submitted distinguished name which could be matched by the server. |
java.lang.String |
getMessage()
|
int |
getResultCode()
Returns the result code from the exception. |
java.lang.String |
resultCodeToString()
Returns a string representing the result code in the default locale. |
static java.lang.String |
resultCodeToString(int code)
Returns a string representing the specified result code in the default locale. |
static java.lang.String |
resultCodeToString(int code,
java.util.Locale locale)
Returns a string representing the specified error code in the specified locale. |
java.lang.String |
resultCodeToString(java.util.Locale locale)
Returns a string representing the result code in the specified locale. |
java.lang.String |
toString()
returns a string of information about the exception and the the nested exceptions, if any. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int SUCCESS
SUCCESS = 0
public static final int OPERATIONS_ERROR
The server is unable to respond with a more specific error and is also unable to properly respond to a request. It does not indicate that the client has sent an erroneous message.
OPERATIONS_ERROR = 1
public static final int PROTOCOL_ERROR
PROTOCOL_ERROR = 2
public static final int TIME_LIMIT_EXCEEDED
On search operations, incomplete results are returned.
TIME_LIMIT_EXCEEDED = 3
public static final int SIZE_LIMIT_EXCEEDED
SIZE_LIMIT_EXCEEDED = 4
public static final int COMPARE_FALSE
COMPARE_FALSE = 5
public static final int COMPARE_TRUE
COMPARE_TRUE = 6
public static final int AUTH_METHOD_NOT_SUPPORTED
AUTH_METHOD_NOT_SUPPORTED = 7
public static final int STRONG_AUTH_REQUIRED
One of the following has occurred:
STRONG_AUTH_REQUIRED = 8
public static final int LDAP_PARTIAL_RESULTS
LDAP_PARTIAL_RESULTS = 9
public static final int REFERRAL
REFERRAL = 10
public static final int ADMIN_LIMIT_EXCEEDED
ADMIN_LIMIT_EXCEEDED = 11
public static final int UNAVAILABLE_CRITICAL_EXTENSION
Either the server does not support the control or the control is not appropriate for the operation type.
UNAVAILABLE_CRITICAL_EXTENSION = 12
public static final int CONFIDENTIALITY_REQUIRED
CONFIDENTIALITY_REQUIRED = 13
public static final int SASL_BIND_IN_PROGRESS
SASL_BIND_IN_PROGRESS = 14
public static final int NO_SUCH_ATTRIBUTE
NO_SUCH_ATTRIBUTE = 16
public static final int UNDEFINED_ATTRIBUTE_TYPE
UNDEFINED_ATTRIBUTE_TYPE = 17
public static final int INAPPROPRIATE_MATCHING
INAPPROPRIATE_MATCHING = 18
public static final int CONSTRAINT_VIOLATION
CONSTRAINT_VIOLATION = 19
public static final int ATTRIBUTE_OR_VALUE_EXISTS
ATTRIBUTE_OR_VALUE_EXISTS = 20
public static final int INVALID_ATTRIBUTE_SYNTAX
INVALID_ATTRIBUTE_SYNTAX = 21
public static final int NO_SUCH_OBJECT
This code is not returned on the following operations:
NO_SUCH_OBJECT = 32
public static final int ALIAS_PROBLEM
ALIAS_PROBLEM = 33
public static final int INVALID_DN_SYNTAX
If the DN syntax is correct, but the LDAP server's structure rules do not permit the operation, the server returns LDAP_UNWILLING_TO_PERFORM.
INVALID_DN_SYNTAX = 34
public static final int IS_LEAF
This code is not currently in the LDAP specifications, but is reserved for this constant.
IS_LEAF = 35
public static final int ALIAS_DEREFERENCING_PROBLEM
ALIAS_DEREFERENCING_PROBLEM = 36
public static final int INAPPROPRIATE_AUTHENTICATION
For example, either of the following cause this error:
INAPPROPRIATE_AUTHENTICATION = 48
public static final int INVALID_CREDENTIALS
One of the following occurred:
INVALID_CREDENTIALS = 49
public static final int INSUFFICIENT_ACCESS_RIGHTS
INSUFFICIENT_ACCESS_RIGHTS = 50
public static final int BUSY
BUSY = 51
public static final int UNAVAILABLE
UNAVAILABLE = 52
public static final int UNWILLING_TO_PERFORM
This error is returned for the following reasons:
UNWILLING_TO_PERFORM = 53
public static final int LOOP_DETECT
LOOP_DETECT = 54
public static final int NAMING_VIOLATION
For example,
NAMING_VIOLATION = 64
public static final int OBJECT_CLASS_VIOLATION
For example, the following types of request return this error:
OBJECT_CLASS_VIOLATION = 65
public static final int NOT_ALLOWED_ON_NONLEAF
For example, the following types of requests return this error:
NOT_ALLOWED_ON_NONLEAF = 66
public static final int NOT_ALLOWED_ON_RDN
NOT_ALLOWED_ON_RDN = 67
public static final int ENTRY_ALREADY_EXISTS
ENTRY_ALREADY_EXISTS = 68
public static final int OBJECT_CLASS_MODS_PROHIBITED
OBJECT_CLASS_MODS_PROHIBITED = 69
public static final int AFFECTS_MULTIPLE_DSAS
AFFECTS_MULTIPLE_DSAS = 71
public static final int OTHER
OTHER = 80
public static final int SERVER_DOWN
SERVER_DOWN = 81
public static final int LOCAL_ERROR
LOCAL_ERROR = 82
public static final int ENCODING_ERROR
ENCODING_ERROR = 83
public static final int DECODING_ERROR
DECODING_ERROR = 84
public static final int LDAP_TIMEOUT
LDAP_TIMEOUT = 85
public static final int AUTH_UNKNOWN
AUTH_UNKNOWN = 86
public static final int FILTER_ERROR
FILTER_ERROR = 87
public static final int USER_CANCELLED
USER_CANCELLED = 88
public static final int NO_MEMORY
NO_MEMORY = 90
public static final int CONNECT_ERROR
CONNECT_ERROR = 91
public static final int LDAP_NOT_SUPPORTED
LDAP_NOT_SUPPORTED = 92
public static final int CONTROL_NOT_FOUND
CONTROL_NOT_FOUND = 93
public static final int NO_RESULTS_RETURNED
NO_RESULTS_RETURNED = 94
public static final int MORE_RESULTS_TO_RETURN
MORE_RESULTS_TO_RETURN = 95
public static final int CLIENT_LOOP
CLIENT_LOOP = 96
public static final int REFERRAL_LIMIT_EXCEEDED
The hop limit determines how many servers the client can hop through to retrieve data. For example, suppose the following conditions:
With these conditions, the hop limit is exceeded and the LDAP libraries set this code.
REFERRAL_LIMIT_EXCEEDED = 97
public static final int INVALID_RESPONSE
INVALID_RESPONSE = 100
public static final int AMBIGUOUS_RESPONSE
AMBIGUOUS_RESPONSE = 101
public static final int TLS_NOT_SUPPORTED
TLS_NOT_SUPPORTED = 112
Constructor Detail |
public LDAPException()
public LDAPException(java.lang.String messageOrKey, int resultCode, java.lang.String serverMsg)
Constructs an exception with a detailed message obtained from the
specified MessageOrKey
String, the result code,
and a server meessage.
The String is used either as a message key to obtain a localized messsage from ExceptionMessages, or if there is no key in the resource matching the text, it is used as the detailed message itself.
messageOrKey
- Key to addition result information, a key into
ExceptionMessages, or the information
itself if the key doesn't exist.
resultCode
- The result code returned.
serverMsg
- Error message specifying additional information
from the serverpublic LDAPException(java.lang.String messageOrKey, java.lang.Object[] arguments, int resultCode, java.lang.String serverMsg)
Constructs an exception with a detailed message obtained from the
specified MessageOrKey
String and modifying arguments.
Additional parameters specify the result code and server message.
The String is used either as a message key to obtain a localized messsage from ExceptionMessages, or if there is no key in the resource matching the text, it is used as the detailed message itself.
The message in the default locale is built with the supplied arguments, which are saved to be used for building messages for other locales.
messageOrKey
- Key to addition result information, a key into
ExceptionMessages, or the information
itself if the key doesn't exist.
arguments
- The modifying arguments to be included in the
message string.
serverMsg
- Error message specifying additional information
from the server
resultCode
- The result code returned.public LDAPException(java.lang.String messageOrKey, int resultCode, java.lang.String serverMsg, java.lang.Throwable rootException)
Constructs an exception with a detailed message obtained from the
specified MessageOrKey
String.
Additional parameters specify the result code, the server message, and a
rootException which is the underlying cause of an error on the client.
The String is used either as a message key to obtain a localized messsage from ExceptionMessages, or if there is no key in the resource matching the text, it is used as the detailed message itself.
messageOrKey
- Key to addition result information, a key into
ExceptionMessages, or the information
itself if the key doesn't exist.
resultCode
- The result code returned.
serverMsg
- Error message specifying additional information
from the server
rootException
- A throwable which is the underlying cause
of the LDAPException.public LDAPException(java.lang.String messageOrKey, java.lang.Object[] arguments, int resultCode, java.lang.String serverMsg, java.lang.Throwable rootException)
Constructs an exception with a detailed message obtained from the
specified MessageOrKey
String and modifying arguments.
Additional parameters specify the result code, the server message,
and a rootException which is the underlying cause of an error
on the client.
The String is used either as a message key to obtain a localized messsage from ExceptionMessages, or if there is no key in the resource matching the text, it is used as the detailed message itself.
The message in the default locale is built with the supplied arguments, which are saved to be used for building messages for other locales.
messageOrKey
- Key to addition result information, a key into
ExceptionMessages, or the information
itself if the key doesn't exist.
arguments
- The modifying arguments to be included in the
message string.
resultCode
- The result code returned.
serverMsg
- Error message specifying additional information
from the server
rootException
- A throwable which is the underlying cause
of the LDAPException.public LDAPException(java.lang.String messageOrKey, int resultCode, java.lang.String serverMsg, java.lang.String matchedDN)
Constructs an exception with a detailed message obtained from the
specified MessageOrKey
String.
Additional parameters specify the result code, the message returned
from the server, and a matchedDN returned from the server.
The String is used either as a message key to obtain a localized messsage from ExceptionMessages, or if there is no key in the resource matching the text, it is used as the detailed message itself.
messageOrKey
- Key to addition result information, a key into
ExceptionMessages, or the information
itself if the key doesn't exist.
resultCode
- The result code returned.
serverMsg
- Error message specifying additional information
from the server
matchedDN
- The maximal subset of a specified DN which could
be matched by the server on a search operation.public LDAPException(java.lang.String messageOrKey, java.lang.Object[] arguments, int resultCode, java.lang.String serverMsg, java.lang.String matchedDN)
Constructs an exception with a detailed message obtained from the
specified MessageOrKey
String and modifying arguments.
Additional parameters specify the result code, a message returned from
the server, and a matchedDN returned from the server.
The String is used either as a message key to obtain a localized messsage from ExceptionMessages, or if there is no key in the resource matching the text, it is used as the detailed message itself.
The message in the default locale is built with the supplied arguments, which are saved to be used for building messages for other locales.
messageOrKey
- Key to addition result information, a key into
ExceptionMessages, or the information
itself if the key doesn't exist.
arguments
- The modifying arguments to be included in the
message string.
resultCode
- The result code returned.
serverMsg
- Error message specifying additional information
from the server
matchedDN
- The maximal subset of a specified DN which could
be matched by the server on a search operation.Method Detail |
public java.lang.String resultCodeToString()
public static java.lang.String resultCodeToString(int code)
code
- The result code for which a message is to be returned.
public java.lang.String resultCodeToString(java.util.Locale locale)
locale
- The locale in which to render the error message.
public static java.lang.String resultCodeToString(int code, java.util.Locale locale)
code
- The result code for which a message is to be
returned.
locale
- The locale in which to render the message.
public java.lang.String getLDAPErrorMessage()
public java.lang.Throwable getCause()
public int getResultCode()
The codes are defined as public final static int
members
of the LDAP Exception class. If the exception is a
result of error information returned from a directory operation, the
code will be one of those defined for the class. Otherwise, a local error
code is returned.
public java.lang.String getMatchedDN()
public java.lang.String getMessage()
public java.lang.String getLocalizedMessage()
public java.lang.String toString()
|
LDAP Classes Implements Java LDAP |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |