Class ResultCode

  • All Implemented Interfaces:
    java.io.Serializable

    @NotMutable
    @ThreadSafety(level=COMPLETELY_THREADSAFE)
    public final class ResultCode
    extends java.lang.Object
    implements java.io.Serializable
    This class defines a number of constants associated with LDAP result codes. The ResultCode constant values defined in this class are immutable, and at most one result code object will ever be created for a given int value, so it is acceptable to compare result codes with either the equals(java.lang.Object) method or the "==" operator.

    The result codes that are currently defined include:
    Name Integer Value
    SUCCESS 0
    OPERATIONS_ERROR 1
    PROTOCOL_ERROR 2
    TIME_LIMIT_EXCEEDED 3
    SIZE_LIMIT_EXCEEDED 4
    COMPARE_FALSE 5
    COMPARE_TRUE 6
    AUTH_METHOD_NOT_SUPPORTED 7
    STRONG_AUTH_REQUIRED 8
    REFERRAL 10
    ADMIN_LIMIT_EXCEEDED 11
    UNAVAILABLE_CRITICAL_EXTENSION 12
    CONFIDENTIALITY_REQUIRED 13
    SASL_BIND_IN_PROGRESS 14
    NO_SUCH_ATTRIBUTE 16
    UNDEFINED_ATTRIBUTE_TYPE 17
    INAPPROPRIATE_MATCHING 18
    CONSTRAINT_VIOLATION 19
    ATTRIBUTE_OR_VALUE_EXISTS 20
    INVALID_ATTRIBUTE_SYNTAX 21
    NO_SUCH_OBJECT 32
    ALIAS_PROBLEM 33
    INVALID_DN_SYNTAX 34
    ALIAS_DEREFERENCING_PROBLEM 36
    INAPPROPRIATE_AUTHENTICATION 48
    INVALID_CREDENTIALS 49
    INSUFFICIENT_ACCESS_RIGHTS 50
    BUSY 51
    UNAVAILABLE 52
    UNWILLING_TO_PERFORM 53
    LOOP_DETECT 54
    SORT_CONTROL_MISSING 60
    OFFSET_RANGE_ERROR 61
    NAMING_VIOLATION 64
    OBJECT_CLASS_VIOLATION 65
    NOT_ALLOWED_ON_NONLEAF 66
    NOT_ALLOWED_ON_NONLEAF 66
    NOT_ALLOWED_ON_RDN 67
    ENTRY_ALREADY_EXISTS 68
    OBJECT_CLASS_MODS_PROHIBITED 69
    AFFECTS_MULTIPLE_DSAS 71
    VIRTUAL_LIST_VIEW_ERROR 76
    OTHER 80
    SERVER_DOWN 81
    LOCAL_ERROR 82
    ENCODING_ERROR 83
    DECODING_ERROR 84
    TIMEOUT 85
    AUTH_UNKNOWN 86
    FILTER_ERROR 87
    USER_CANCELED 88
    PARAM_ERROR 89
    NO_MEMORY 90
    CONNECT_ERROR 91
    NOT_SUPPORTED 92
    CONTROL_NOT_FOUND 93
    NO_RESULTS_RETURNED 94
    MORE_RESULTS_TO_RETURN 95
    CLIENT_LOOP 96
    REFERRAL_LIMIT_EXCEEDED 97
    CANCELED 118
    NO_SUCH_OPERATION 119
    TOO_LATE 120
    CANNOT_CANCEL 121
    ASSERTION_FAILED 122
    AUTHORIZATION_DENIED 123
    E_SYNC_REFRESH_REQUIRED 4096
    NO_OPERATION 16654
    INTERACTIVE_TRANSACTION_ABORTED 30221001
    DATABASE_LOCK_CONFLICT 30221002
    MIRRORED_SUBTREE_DIGEST_MISMATCH 30221003
    TOKEN_DELIVERY_MECHANISM_UNAVAILABLE 30221004
    TOKEN_DELIVERY_ATTEMPT_FAILED 30221005
    TOKEN_DELIVERY_INVALID_RECIPIENT_ID 30221006
    TOKEN_DELIVERY_INVALID_ACCOUNT_STATE 30221007
    See Also:
    Serialized Form
    • Field Detail

      • SUCCESS

        @NotNull
        public static final ResultCode SUCCESS
        The result code (0) that will be used to indicate a successful operation. This result code is defined in RFC 4511 section 4.1.9.
      • OPERATIONS_ERROR

        @NotNull
        public static final ResultCode OPERATIONS_ERROR
        The result code (1) that will be used to indicate that an operation was requested out of sequence. This result code is defined in RFC 4511 section 4.1.9.
      • PROTOCOL_ERROR

        @NotNull
        public static final ResultCode PROTOCOL_ERROR
        The result code (2) that will be used to indicate that the client sent a malformed request. This result code is defined in RFC 4511 section 4.1.9.
      • TIME_LIMIT_EXCEEDED

        @NotNull
        public static final ResultCode TIME_LIMIT_EXCEEDED
        The result code (3) that will be used to indicate that the server was unable to complete processing on the request in the allotted time limit. This result code is defined in RFC 4511 section 4.1.9.
      • SIZE_LIMIT_EXCEEDED

        @NotNull
        public static final ResultCode SIZE_LIMIT_EXCEEDED
        The result code (4) that will be used to indicate that the server found more matching entries than the configured request size limit. This result code is defined in RFC 4511 section 4.1.9.
      • COMPARE_FALSE

        @NotNull
        public static final ResultCode COMPARE_FALSE
        The result code (5) that will be used if a requested compare assertion does not match the target entry. This result code is defined in RFC 4511 section 4.1.9.
      • COMPARE_TRUE

        @NotNull
        public static final ResultCode COMPARE_TRUE
        The result code (6) that will be used if a requested compare assertion matched the target entry. This result code is defined in RFC 4511 section 4.1.9.
      • AUTH_METHOD_NOT_SUPPORTED

        @NotNull
        public static final ResultCode AUTH_METHOD_NOT_SUPPORTED
        The result code (7) that will be used if the client requested a form of authentication that is not supported by the server. This result code is defined in RFC 4511 section 4.1.9.
      • STRONG_AUTH_REQUIRED

        @NotNull
        public static final ResultCode STRONG_AUTH_REQUIRED
        The result code (8) that will be used if the client requested an operation that requires a strong authentication mechanism. This result code is defined in RFC 4511 section 4.1.9.
      • REFERRAL

        @NotNull
        public static final ResultCode REFERRAL
        The result code (10) that will be used if the server sends a referral to the client to refer to data in another location. This result code is defined in RFC 4511 section 4.1.9.
      • ADMIN_LIMIT_EXCEEDED

        @NotNull
        public static final ResultCode ADMIN_LIMIT_EXCEEDED
        The result code (11) that will be used if a server administrative limit has been exceeded. This result code is defined in RFC 4511 section 4.1.9.
      • UNAVAILABLE_CRITICAL_EXTENSION

        @NotNull
        public static final ResultCode UNAVAILABLE_CRITICAL_EXTENSION
        The result code (12) that will be used if the client requests a critical control that is not supported by the server. This result code is defined in RFC 4511 section 4.1.9.
      • CONFIDENTIALITY_REQUIRED

        @NotNull
        public static final ResultCode CONFIDENTIALITY_REQUIRED
        The result code (13) that will be used if the server requires a secure communication mechanism for the requested operation. This result code is defined in RFC 4511 section 4.1.9.
      • SASL_BIND_IN_PROGRESS

        @NotNull
        public static final ResultCode SASL_BIND_IN_PROGRESS
        The result code (14) that will be returned from the server after SASL bind stages in which more processing is required. This result code is defined in RFC 4511 section 4.1.9.
      • NO_SUCH_ATTRIBUTE

        @NotNull
        public static final ResultCode NO_SUCH_ATTRIBUTE
        The result code (16) that will be used if the client referenced an attribute that does not exist in the target entry. This result code is defined in RFC 4511 section 4.1.9.
      • UNDEFINED_ATTRIBUTE_TYPE

        @NotNull
        public static final ResultCode UNDEFINED_ATTRIBUTE_TYPE
        The result code (17) that will be used if the client referenced an attribute that is not defined in the server schema. This result code is defined in RFC 4511 section 4.1.9.
      • INAPPROPRIATE_MATCHING

        @NotNull
        public static final ResultCode INAPPROPRIATE_MATCHING
        The result code (18) that will be used if the client attempted to use an attribute in a search filter in a manner not supported by the matching rules associated with that attribute. This result code is defined in RFC 4511 section 4.1.9.
      • CONSTRAINT_VIOLATION

        @NotNull
        public static final ResultCode CONSTRAINT_VIOLATION
        The result code (19) that will be used if the requested operation would violate some constraint defined in the server. This result code is defined in RFC 4511 section 4.1.9.
      • ATTRIBUTE_OR_VALUE_EXISTS

        @NotNull
        public static final ResultCode ATTRIBUTE_OR_VALUE_EXISTS
        The result code (20) that will be used if the client attempts to modify an entry in a way that would create a duplicate value, or create multiple values for a single-valued attribute. This result code is defined in RFC 4511 section 4.1.9.
      • INVALID_ATTRIBUTE_SYNTAX

        @NotNull
        public static final ResultCode INVALID_ATTRIBUTE_SYNTAX
        The result code (21) that will be used if the client attempts to perform an operation that would create an attribute value that violates the syntax for that attribute. This result code is defined in RFC 4511 section 4.1.9.
      • NO_SUCH_OBJECT

        @NotNull
        public static final ResultCode NO_SUCH_OBJECT
        The result code (32) that will be used if the client targeted an entry that does not exist. This result code is defined in RFC 4511 section 4.1.9.
      • ALIAS_PROBLEM

        @NotNull
        public static final ResultCode ALIAS_PROBLEM
        The result code (33) that will be used if the client targeted an entry that as an alias. This result code is defined in RFC 4511 section 4.1.9.
      • INVALID_DN_SYNTAX

        @NotNull
        public static final ResultCode INVALID_DN_SYNTAX
        The result code (34) that will be used if the client provided an invalid DN. This result code is defined in RFC 4511 section 4.1.9.
      • ALIAS_DEREFERENCING_PROBLEM

        @NotNull
        public static final ResultCode ALIAS_DEREFERENCING_PROBLEM
        The result code (36) that will be used if a problem is encountered while the server is attempting to dereference an alias. This result code is defined in RFC 4511 section 4.1.9.
      • INAPPROPRIATE_AUTHENTICATION

        @NotNull
        public static final ResultCode INAPPROPRIATE_AUTHENTICATION
        The result code (48) that will be used if the client attempts to perform a type of authentication that is not supported for the target user. This result code is defined in RFC 4511 section 4.1.9.
      • INVALID_CREDENTIALS

        @NotNull
        public static final ResultCode INVALID_CREDENTIALS
        The result code (49) that will be used if the client provided invalid credentials while trying to authenticate. This result code is defined in RFC 4511 section 4.1.9.
      • INSUFFICIENT_ACCESS_RIGHTS

        @NotNull
        public static final ResultCode INSUFFICIENT_ACCESS_RIGHTS
        The result code (50) that will be used if the client does not have permission to perform the requested operation. This result code is defined in RFC 4511 section 4.1.9.
      • BUSY

        @NotNull
        public static final ResultCode BUSY
        The result code (51) that will be used if the server is too busy to process the requested operation. This result code is defined in RFC 4511 section 4.1.9.
      • UNAVAILABLE

        @NotNull
        public static final ResultCode UNAVAILABLE
        The result code (52) that will be used if the server is unavailable. This result code is defined in RFC 4511 section 4.1.9.
      • UNWILLING_TO_PERFORM

        @NotNull
        public static final ResultCode UNWILLING_TO_PERFORM
        The result code (53) that will be used if the server is not willing to perform the requested operation. This result code is defined in RFC 4511 section 4.1.9.
      • LOOP_DETECT

        @NotNull
        public static final ResultCode LOOP_DETECT
        The result code (54) that will be used if the server detects a chaining or alias loop. This result code is defined in RFC 4511 section 4.1.9.
      • SORT_CONTROL_MISSING

        @NotNull
        public static final ResultCode SORT_CONTROL_MISSING
        The result code (60) that will be used if the client sends a virtual list view control without a server-side sort control. This result code is defined in draft-ietf-ldapext-ldapv3-vlv-09 section 6.2.
      • OFFSET_RANGE_ERROR

        @NotNull
        public static final ResultCode OFFSET_RANGE_ERROR
        The result code (61) that will be used if the client provides a virtual list view control with a target offset that is out of range for the available data set. This result code is defined in draft-ietf-ldapext-ldapv3-vlv-09 section 6.2.
      • NAMING_VIOLATION

        @NotNull
        public static final ResultCode NAMING_VIOLATION
        The result code (64) that will be used if the client request violates a naming constraint (e.g., a name form or DIT structure rule) defined in the server. This result code is defined in RFC 4511 section 4.1.9.
      • OBJECT_CLASS_VIOLATION

        @NotNull
        public static final ResultCode OBJECT_CLASS_VIOLATION
        The result code (65) that will be used if the client request violates an object class constraint (e.g., an undefined object class, a disallowed attribute, or a missing required attribute) defined in the server. This result code is defined in RFC 4511 section 4.1.9.
      • NOT_ALLOWED_ON_NONLEAF

        @NotNull
        public static final ResultCode NOT_ALLOWED_ON_NONLEAF
        The result code (66) that will be used if the requested operation is not allowed to be performed on non-leaf entries. This result code is defined in RFC 4511 section 4.1.9.
      • NOT_ALLOWED_ON_RDN

        @NotNull
        public static final ResultCode NOT_ALLOWED_ON_RDN
        The result code (67) that will be used if the requested operation would alter the RDN of the entry but the operation was not a modify DN request. This result code is defined in RFC 4511 section 4.1.9.
      • ENTRY_ALREADY_EXISTS

        @NotNull
        public static final ResultCode ENTRY_ALREADY_EXISTS
        The result code (68) that will be used if the requested operation would create a conflict with an entry that already exists in the server. This result code is defined in RFC 4511 section 4.1.9.
      • OBJECT_CLASS_MODS_PROHIBITED

        @NotNull
        public static final ResultCode OBJECT_CLASS_MODS_PROHIBITED
        The result code (69) that will be used if the requested operation would alter the set of object classes defined in the entry in a disallowed manner. This result code is defined in RFC 4511 section 4.1.9.
      • AFFECTS_MULTIPLE_DSAS

        @NotNull
        public static final ResultCode AFFECTS_MULTIPLE_DSAS
        The result code (71) that will be used if the requested operation would impact entries in multiple data sources. This result code is defined in RFC 4511 section 4.1.9.
      • VIRTUAL_LIST_VIEW_ERROR

        @NotNull
        public static final ResultCode VIRTUAL_LIST_VIEW_ERROR
        The result code (76) that will be used if an error occurred while performing processing associated with the virtual list view control. This result code is defined in draft-ietf-ldapext-ldapv3-vlv-09 section 6.2.1.
      • OTHER

        @NotNull
        public static final ResultCode OTHER
        The result code (80) that will be used if none of the other result codes are appropriate. This result code is defined in RFC 4511 section 4.1.9.
      • SERVER_DOWN

        @NotNull
        public static final ResultCode SERVER_DOWN
        The client-side result code (81) that will be used if an established connection to the server is lost. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • LOCAL_ERROR

        @NotNull
        public static final ResultCode LOCAL_ERROR
        The client-side result code (82) that will be used if a generic client-side error occurs during processing. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • ENCODING_ERROR

        @NotNull
        public static final ResultCode ENCODING_ERROR
        The client-side result code (83) that will be used if an error occurs while encoding a request. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • DECODING_ERROR

        @NotNull
        public static final ResultCode DECODING_ERROR
        The client-side result code (84) that will be used if an error occurs while decoding a response. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • TIMEOUT

        @NotNull
        public static final ResultCode TIMEOUT
        The client-side result code (85) that will be used if a client timeout occurs while waiting for a response from the server. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • AUTH_UNKNOWN

        @NotNull
        public static final ResultCode AUTH_UNKNOWN
        The client-side result code (86) that will be used if the client attempts to use an unknown authentication type. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • FILTER_ERROR

        @NotNull
        public static final ResultCode FILTER_ERROR
        The client-side result code (87) that will be used if an error occurs while attempting to encode a search filter. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • USER_CANCELED

        @NotNull
        public static final ResultCode USER_CANCELED
        The client-side result code (88) that will be used if the end user canceled the operation in progress. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • PARAM_ERROR

        @NotNull
        public static final ResultCode PARAM_ERROR
        The client-side result code (89) that will be used if there is a problem with the parameters provided for a request. This result code is defined in draft-ietf-ldapext-ldap-java-api-13 section 4.14.7.
      • NO_MEMORY

        @NotNull
        public static final ResultCode NO_MEMORY
        The client-side result code (90) that will be used if the client does not have sufficient memory to perform the requested operation. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • CONNECT_ERROR

        @NotNull
        public static final ResultCode CONNECT_ERROR
        The client-side result code (91) that will be used if an error occurs while attempting to connect to a target server. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • NOT_SUPPORTED

        @NotNull
        public static final ResultCode NOT_SUPPORTED
        The client-side result code (92) that will be used if the requested operation is not supported. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • CONTROL_NOT_FOUND

        @NotNull
        public static final ResultCode CONTROL_NOT_FOUND
        The client-side result code (93) that will be used if the response from the server did not include an expected control. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • NO_RESULTS_RETURNED

        @NotNull
        public static final ResultCode NO_RESULTS_RETURNED
        The client-side result code (94) that will be used if the server did not send any results. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • MORE_RESULTS_TO_RETURN

        @NotNull
        public static final ResultCode MORE_RESULTS_TO_RETURN
        The client-side result code (95) that will be used if there are still more results to return. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • CLIENT_LOOP

        @NotNull
        public static final ResultCode CLIENT_LOOP
        The client-side result code (96) that will be used if the client detects a loop while attempting to follow referrals. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • REFERRAL_LIMIT_EXCEEDED

        @NotNull
        public static final ResultCode REFERRAL_LIMIT_EXCEEDED
        The client-side result code (97) that will be used if the client encountered too many referrals in the course of processing an operation. This result code is defined in draft-ietf-ldapext-ldap-java-api-19 section 2.15.9.
      • CANCELED

        @NotNull
        public static final ResultCode CANCELED
        The result code (118) that will be used if the operation was canceled. This result code is defined in RFC 3909 section 2.3.
      • NO_SUCH_OPERATION

        @NotNull
        public static final ResultCode NO_SUCH_OPERATION
        The result code (119) that will be used if the client attempts to cancel an operation for which the server has no knowledge (e.g., because the operation had already completed or no such operation had been requested). This result code is defined in RFC 3909 section 2.3.
      • TOO_LATE

        @NotNull
        public static final ResultCode TOO_LATE
        The result code (120) that will be used if the client attempts to cancel an operation too late in the processing for that operation. This result code is defined in RFC 3909 section 2.3.
      • CANNOT_CANCEL

        @NotNull
        public static final ResultCode CANNOT_CANCEL
        The result code (121) that will be used if the client attempts to cancel an operation that cannot be canceled. This result code is defined in RFC 3909 section 2.3.
      • ASSERTION_FAILED

        @NotNull
        public static final ResultCode ASSERTION_FAILED
        The result code (122) that will be used if the requested operation included the LDAP assertion control but the assertion did not match the target entry. This result code is defined in RFC 4528 section 5.3.
      • AUTHORIZATION_DENIED

        @NotNull
        public static final ResultCode AUTHORIZATION_DENIED
        The result code (123) that will be used if the client is denied the ability to use the proxied authorization control. This result code is defined in RFC 4370 section 6 (although the standard name is not referenced there, but it is used in both RFC 4532 section 6.1 and RFC 5805 section 4.4).
      • E_SYNC_REFRESH_REQUIRED

        @NotNull
        public static final ResultCode E_SYNC_REFRESH_REQUIRED
        The result code (4096) that will be used if a client using the content synchronization request control requests an incremental update but the server is unable to honor that request and requires the client to request an initial content. This result code is defined in RFC 4533 section 2.6.
      • NO_OPERATION

        @NotNull
        public static final ResultCode NO_OPERATION
        The result code (16654) for operations that completed successfully but no changes were made to the server because the LDAP no-op control was included in the request. This result code is defined in draft-zeilenga-ldap-noop-12 section 4.3 (although the numeric value is not defined in that specification; the numeric value used for this result code is the same as the one originally used by OpenLDAP).
      • INTERACTIVE_TRANSACTION_ABORTED

        @NotNull
        public static final ResultCode INTERACTIVE_TRANSACTION_ABORTED
        The result code (30221001) for use if an interactive transaction has been aborted, either due to an explicit request from a client or by the server without a client request. This is a proprietary result code originally defined by UnboundID corporation.
      • DATABASE_LOCK_CONFLICT

        @NotNull
        public static final ResultCode DATABASE_LOCK_CONFLICT
        The result code (30221002) for use if an operation fails because of a database lock conflict (e.g., a deadlock or lock timeout). This is a proprietary result code originally defined by UnboundID corporation.
      • MIRRORED_SUBTREE_DIGEST_MISMATCH

        @NotNull
        public static final ResultCode MIRRORED_SUBTREE_DIGEST_MISMATCH
        The result code (30221003) that should be used by a node in a topology of servers to indicate that its subtree digest does not match that of its master. This is a proprietary result code originally defined by UnboundID corporation.
      • TOKEN_DELIVERY_MECHANISM_UNAVAILABLE

        @NotNull
        public static final ResultCode TOKEN_DELIVERY_MECHANISM_UNAVAILABLE
        The result code (30221004) that should be used to indicate that the server could not deliver a one-time password, password reset token, or single-use token because none of the attempted delivery mechanisms were supported for the target user. This is a proprietary result code originally defined by UnboundID corporation.
      • TOKEN_DELIVERY_ATTEMPT_FAILED

        @NotNull
        public static final ResultCode TOKEN_DELIVERY_ATTEMPT_FAILED
        The result code (30221005) that should be used to indicate that the server could not deliver a one-time password, password reset token, or single-use token because a failure was encountered while attempting to deliver the token through all of the supported mechanisms. This is a proprietary result code originally defined by UnboundID corporation.
      • TOKEN_DELIVERY_INVALID_RECIPIENT_ID

        @NotNull
        public static final ResultCode TOKEN_DELIVERY_INVALID_RECIPIENT_ID
        The result code (30221006) that should be used to indicate that the server could not deliver a one-time password, password reset token, or single-use token because the client specified a recipient ID that was not appropriate for the target user. This is a proprietary result code originally defined by UnboundID corporation.
      • TOKEN_DELIVERY_INVALID_ACCOUNT_STATE

        @NotNull
        public static final ResultCode TOKEN_DELIVERY_INVALID_ACCOUNT_STATE
        The result code (30221007) that should be used to indicate that the server could not deliver a one-time password, password reset token, or single-use token because the target user account was in an invalid state for receiving such tokens (e.g., the account is disabled or locked, the password is expired, etc.). This is a proprietary result code originally defined by UnboundID corporation.
    • Method Detail

      • getName

        @NotNull
        public java.lang.String getName()
        Retrieves the user-friendly name for this result code.
        Returns:
        The user-friendly name for this result code.
      • getStandardName

        @Nullable
        public java.lang.String getStandardName()
        Retrieves the name for this result code as it appears in the relevant LDAP specification, if any. In most cases, it is formatted in camelCase, with the first letter lowercase, and the first letter of every subsequent word and all letters in acronyms in uppercase. However, some result codes may use different formatting (for example, those defined in API specifications and meant for client-side use tend to use all uppercase with words separated by underscores).
        Returns:
        The name for this result code as it appears in the relevant LDAP specification, or null if the result code is not defined in any public specification.
      • intValue

        public int intValue()
        Retrieves the integer value for this result code.
        Returns:
        The integer value for this result code.
      • valueOf

        @NotNull
        public static ResultCode valueOf​(int intValue)
        Retrieves the result code with the specified integer value. If the provided integer value does not correspond to a predefined ResultCode object, then a new ResultCode object will be created and returned. Any new result codes created will also be cached and returned for any subsequent requests with that integer value so the same object will always be returned for a given integer value.
        Parameters:
        intValue - The integer value for which to retrieve the corresponding result code.
        Returns:
        The result code with the specified integer value, or a new result code
      • valueOf

        @NotNull
        public static ResultCode valueOf​(int intValue,
                                         @Nullable
                                         java.lang.String name)
        Retrieves the result code with the specified integer value. If the provided integer value does not correspond to a predefined ResultCode object, then a new ResultCode object will be created and returned. Any new result codes created will also be cached and returned for any subsequent requests with that integer value so the same object will always be returned for a given integer value.
        Parameters:
        intValue - The integer value for which to retrieve the corresponding result code.
        name - The user-friendly name to use for the result code if no result code has been previously accessed with the same integer value. It may be null if this is not known or a string representation of the integer value should be used.
        Returns:
        The result code with the specified integer value, or a new result code
      • valueOf

        @Nullable
        public static ResultCode valueOf​(int intValue,
                                         @Nullable
                                         java.lang.String name,
                                         boolean createNewResultCode)
        Retrieves the result code with the specified integer value. If the provided integer value does not correspond to an already-defined ResultCode object, then this method may optionally create and return a new ResultCode. Any new result codes created will also be cached and returned for any subsequent requests with that integer value so the same object will always be returned for a given integer value.
        Parameters:
        intValue - The integer value for which to retrieve the corresponding result code.
        name - The user-friendly name to use for the result code if no result code has been previously accessed with the same integer value. It may be null if this is not known or a string representation of the integer value should be used.
        createNewResultCode - Indicates whether to create a new result code object with the specified integer value and name if that value does not correspond to any already-defined result code.
        Returns:
        The existing result code with the specified integer value if one already existed, a newly-created result code with the specified name and integer value if none already existed but createNewResultCode is true, or null if no result code already existed with the specified integer value and createNewResultCode is false.
      • values

        @NotNull
        public static ResultCode[] values()
        Retrieves an array of all result codes defined in the LDAP SDK. This will not include dynamically-generated values.
        Returns:
        An array of all result codes defined in the LDAP SDK.
      • isClientSideResultCode

        public boolean isClientSideResultCode()
        Indicates whether this result code is one that should be used for client-side errors rather than returned by the server.
        Returns:
        true if this result code is a client-side result code, or false if it is one that may be returned by the server.
      • isClientSideResultCode

        public static boolean isClientSideResultCode​(@NotNull
                                                     ResultCode resultCode)
        Indicates whether the provided result code is one that should be used for client-side errors rather than returned by the server.
        Parameters:
        resultCode - The result code for which to make the determination.
        Returns:
        true if the provided result code is a client-side result code, or false if it is one that may be returned by the server.
      • getConnectionNotUsableResultCodes

        @NotNull
        public static java.util.Set<ResultCodegetConnectionNotUsableResultCodes()
        Retrieves the set of result codes that may indicate that a connection is not usable.
        Returns:
        The set of result codes that may indicate that a connection is not usable.
      • setConnectionNotUsableResultCodes

        public static void setConnectionNotUsableResultCodes​(@NotNull
                                                             ResultCode... connectionNotUsableResultCodes)
        Updates the set of result codes that may indicate that a connection is not usable.
        Parameters:
        connectionNotUsableResultCodes - The set of result codes that may indicate that a connection is not usable. It must not be null, but may be empty.
      • setConnectionNotUsableResultCodes

        public static void setConnectionNotUsableResultCodes​(@NotNull
                                                             java.util.Collection<ResultCode> connectionNotUsableResultCodes)
        Updates the set of result codes that may indicate that a connection is not usable.
        Parameters:
        connectionNotUsableResultCodes - The set of result codes that may indicate that a connection is not usable. It must not be null, but may be empty.
      • isConnectionUsable

        public boolean isConnectionUsable()
        Indicates whether the connection on which this result code was received is likely still usable. Note that this is a best guess, and it may or may not be correct. It will attempt to be conservative so that a connection is more likely to be classified as unusable when it may still be valid than to be classified as usable when that is no longer the case.
        Returns:
        true if it is likely that the connection on which this result code was received is still usable, or false if it may no longer be valid.
      • isConnectionUsable

        public static boolean isConnectionUsable​(@NotNull
                                                 ResultCode resultCode)
        Indicates whether the connection on which the provided result code was received is likely still usable. Note that this is a best guess based on the provided result code, and it may or may not be correct. It will attempt to be conservative so that a connection is more likely to be classified as unusable when it may still be valid than to be classified as usable when that is no longer the case.
        Parameters:
        resultCode - The result code for which to make the determination.
        Returns:
        true if it is likely that the connection on which the provided result code was received is still usable, or false if it may no longer be valid.
      • hashCode

        public int hashCode()
        The hash code for this result code.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        The hash code for this result code.
      • equals

        public boolean equals​(@Nullable
                              java.lang.Object o)
        Indicates whether the provided object is equal to this result code.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - The object for which to make the determination.
        Returns:
        true if the provided object is a result code that is equal to this result code, or false if not.
      • toString

        @NotNull
        public java.lang.String toString()
        Retrieves a string representation of this result code.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of this result code.