Interface LdapConnectionFactory
-
- All Known Implementing Classes:
DefaultLdapConnectionFactory
public interface LdapConnectionFactory
A factory that createsLdapConnection
objects using the providedLdapConnectionConfig
.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LdapConnection
bindConnection(LdapConnection connection)
Issues a bind request on the supplied connection using the name and credentials from the LdapConnectionConfg supplied to the constructor.LdapConnection
configureConnection(LdapConnection connection)
Applies the following configuration settings from the LdapConnectionConfig to the supplied connection: timeOut binaryAttributeDetector This method is called by newLdapConnection, so there is no need to call this on a newly created connection.LdapApiService
getLdapApiService()
Returns the LdapApiService instance used by this factory.LdapConnection
newLdapConnection()
Returns a newly created, configured, and authenticated connection.LdapConnection
newUnboundLdapConnection()
Returns a newly created connection, that has not been bound (bind) that otherwise respects LdapConnectionConfig supplied to the constructor.
-
-
-
Method Detail
-
bindConnection
LdapConnection bindConnection(LdapConnection connection) throws LdapException
Issues a bind request on the supplied connection using the name and credentials from the LdapConnectionConfg supplied to the constructor. Returns the connection supplied for chaining.- Parameters:
connection
- The connection to bind with the configuration credentials.- Returns:
- The connection supplied.
- Throws:
LdapException
- If the bind fails.
-
configureConnection
LdapConnection configureConnection(LdapConnection connection)
Applies the following configuration settings from the LdapConnectionConfig to the supplied connection:- timeOut
- binaryAttributeDetector
- Parameters:
connection
- The connection to configure- Returns:
- The supplied connection.
-
getLdapApiService
LdapApiService getLdapApiService()
Returns the LdapApiService instance used by this factory.- Returns:
- The LdapApiService instance used by this factory
-
newLdapConnection
LdapConnection newLdapConnection() throws LdapException
Returns a newly created, configured, and authenticated connection. This method should be used by a connection pool to manufacture the pooled instances.- Returns:
- A newly created, configured, and authenticated LdapConnection.
- Throws:
LdapException
- If the new connection couldn't be established
-
newUnboundLdapConnection
LdapConnection newUnboundLdapConnection()
Returns a newly created connection, that has not been bound (bind) that otherwise respects LdapConnectionConfig supplied to the constructor. This is useful for authentication purposes where the consumer will use a bind operation.- Returns:
- A newly created and configured LdapConnection.
-
-