Package netscape.ldap

Class LDAPReferralException

All Implemented Interfaces:
Serializable

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.
Version:
1.0
See Also:
  • Constructor Details

    • LDAPReferralException

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

      public LDAPReferralException(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(String message, int resultCode, 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(String message, int resultCode, 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 Details

    • 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.
    • toString

      public String toString()
      Gets the string representation of the referral exception, which includes the result code, the message sent back from the LDAP server and the list of referrals.
      Overrides:
      toString in class LDAPException
      Returns:
      string representation of exception.
      See Also: