Package org.forgerock.opendj.ldap.spi
Interface TransportProvider
-
public interface TransportProvider
Interface for ldap socket providers, which provide implementation forLdapSocket
class, using a specific transport.A ldap socket provider must be declared in the provider-configuration file
META-INF/services/org.forgerock.opendj.ldap.spi.LdapSocketProvider
in order to allow automatic loading of the implementation classes using thejava.util.ServiceLoader
facility.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getName()
Returns the name of this transport provider.LdapSocketAcceptor
newLdapSocketAcceptor(Set<InetSocketAddress> addresses, Options options, Consumer<LdapSocket> handler)
Returns an implementation ofLdapSocketAcceptor
.LdapSocketConnector
newLdapSocketConnector(String host, int port, Options options)
Returns an implementation ofLdapSocketConnector
.
-
-
-
Method Detail
-
getName
String getName()
Returns the name of this transport provider.- Returns:
- The name of this transport provider.
-
newLdapSocketConnector
LdapSocketConnector newLdapSocketConnector(String host, int port, Options options)
Returns an implementation ofLdapSocketConnector
. The address will be resolved each time a new connection is returned.- Parameters:
host
- The hostname of the Directory Server to connect to.port
- The port number of the Directory Server to connect to.options
- The LDAP options to use when creating connections.- Returns:
- An implementation of
LdapSocketConnector
-
newLdapSocketAcceptor
LdapSocketAcceptor newLdapSocketAcceptor(Set<InetSocketAddress> addresses, Options options, Consumer<LdapSocket> handler) throws IOException
Returns an implementation ofLdapSocketAcceptor
.- Parameters:
addresses
- The addresses to listen on.options
- The LDAP listener options.handler
- The handler which will process incoming connections. Must be thread safe.- Returns:
- an implementation of
LdapSocketAcceptor
- Throws:
IOException
- If an error occurred while trying to listen on the provided address.
-
-