LDAPJDK 4.1

netscape.ldap
Class LDAPReferralException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--netscape.ldap.LDAPException
                    |
                    +--netscape.ldap.LDAPReferralException

public class LDAPReferralException
extends LDAPException

Represents the situation in which the LDAP server refers the client to another LDAP server. This exception constructs a list of referral URLs from the LDAP error message returned by the server. You can get this list by using the getURLs method.

See Also:
LDAPException, Serialized Form

Fields inherited from class netscape.ldap.LDAPException
ADMIN_LIMIT_EXCEEDED, AFFECTS_MULTIPLE_DSAS, ALIAS_DEREFERENCING_PROBLEM, ALIAS_PROBLEM, ATTRIBUTE_OR_VALUE_EXISTS, AUTH_METHOD_NOT_SUPPORTED, BUSY, CLIENT_LOOP, COMPARE_FALSE, COMPARE_TRUE, CONFIDENTIALITY_REQUIRED, CONNECT_ERROR, CONSTRAINT_VIOLATION, CONTROL_NOT_FOUND, ENTRY_ALREADY_EXISTS, INAPPROPRIATE_AUTHENTICATION, INAPPROPRIATE_MATCHING, INDEX_RANGE_ERROR, INSUFFICIENT_ACCESS_RIGHTS, INVALID_ATTRIBUTE_SYNTAX, INVALID_CREDENTIALS, INVALID_DN_SYNTAX, IS_LEAF, LDAP_NOT_SUPPORTED, LDAP_PARTIAL_RESULTS, LDAP_TIMEOUT, LOOP_DETECT, MORE_RESULTS_TO_RETURN, NAMING_VIOLATION, NO_RESULTS_RETURNED, NO_SUCH_ATTRIBUTE, NO_SUCH_OBJECT, NOT_ALLOWED_ON_NONLEAF, NOT_ALLOWED_ON_RDN, OBJECT_CLASS_MODS_PROHIBITED, OBJECT_CLASS_VIOLATION, OPERATION_ERROR, OTHER, PARAM_ERROR, PROTOCOL_ERROR, REFERRAL, REFERRAL_LIMIT_EXCEEDED, SASL_BIND_IN_PROGRESS, SERVER_DOWN, SIZE_LIMIT_EXCEEDED, SORT_CONTROL_MISSING, STRONG_AUTH_REQUIRED, SUCCESS, TIME_LIMIT_EXCEEDED, UNAVAILABLE, UNAVAILABLE_CRITICAL_EXTENSION, UNDEFINED_ATTRIBUTE_TYPE, UNWILLING_TO_PERFORM
 
Constructor Summary
LDAPReferralException()
          Constructs a default exception with no specific error information.
LDAPReferralException(java.lang.String message)
          Constructs a default exception with a specified string as additional information.
LDAPReferralException(java.lang.String message, int resultCode, java.lang.String serverErrorMessage)
          Constructs a default exception with a specified string as additional information.
LDAPReferralException(java.lang.String message, int resultCode, java.lang.String[] referrals)
          Constructs an exception with a list of LDAP URLs to other LDAP servers.
 
Method Summary
 LDAPUrl[] getURLs()
          Gets the list of referrals (LDAP URLs to other servers) returned by the LDAP server.
 
Methods inherited from class netscape.ldap.LDAPException
errorCodeToString, errorCodeToString, errorCodeToString, errorCodeToString, getLDAPErrorMessage, getLDAPResultCode, getMatchedDN, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LDAPReferralException

public LDAPReferralException()
Constructs a default exception with no specific error information.

LDAPReferralException

public LDAPReferralException(java.lang.String message)
Constructs a default exception with a specified string as additional information. This form is used for lower-level errors.
Parameters:
message - the additional error information

LDAPReferralException

public LDAPReferralException(java.lang.String message,
                             int resultCode,
                             java.lang.String serverErrorMessage)
Constructs a default exception with a specified string as additional information. This form is used for higher-level LDAP operational errors.
Parameters:
message - the additional error information
resultCode - result code
serverErrorMessage - error message

LDAPReferralException

public LDAPReferralException(java.lang.String message,
                             int resultCode,
                             java.lang.String[] referrals)
Constructs an exception with a list of LDAP URLs to other LDAP servers. This list of referrals points the client to LDAP servers that may contain the requested entries.
Parameters:
message - the additional error information
resultCode - result code
referrals - array of LDAP URLs identifying other LDAP servers that may contain the requested entries
Method Detail

getURLs

public LDAPUrl[] getURLs()
Gets the list of referrals (LDAP URLs to other servers) returned by the LDAP server. You can use this list to find the LDAP server that can fulfill your request. If you have set up your search constraints (or the LDAPConnection object) to follow referrals automatically, any operation that results in a referral will use this list to create new connections to the LDAP servers in this list.
Returns:
list of LDAP URLs to other LDAP servers.

LDAPJDK 4.1