Package com.unboundid.ldap.sdk
Interface ReferralConnector
- All Known Subinterfaces:
ReusableReferralConnector
- All Known Implementing Classes:
LDAPConnection,PooledReferralConnector,RetainConnectExceptionReferralConnector
This interface defines an API that may be used to establish a connection
(and perform authentication if appropriate) to a remote server when following
a referral.
Implementations of this interface should be threadsafe to ensure that multiple connections will be able to safely use the same
Implementations of this interface should be threadsafe to ensure that multiple connections will be able to safely use the same
ReferralConnector instance.-
Method Summary
Modifier and TypeMethodDescriptiongetReferralConnection(LDAPURL referralURL, LDAPConnection connection) Retrieves an (optionally authenticated) LDAP connection for use in following a referral as defined in the provided LDAP URL.
-
Method Details
-
getReferralConnection
@NotNull LDAPConnection getReferralConnection(@NotNull LDAPURL referralURL, @NotNull LDAPConnection connection) throws LDAPException Retrieves an (optionally authenticated) LDAP connection for use in following a referral as defined in the provided LDAP URL. The connection will automatically be closed after the referral has been followed.- Parameters:
referralURL- The LDAP URL representing the referral being followed.connection- The connection on which the referral was received.- Returns:
- An LDAP connection established and optionally authenticated to the target system that may be used to attempt to follow a referral.
- Throws:
LDAPException- If a problem occurs while establishing the connection or performing authentication on it. If an exception is thrown, then any underlying connection should be terminated before the exception is thrown.
-