public final class GrizzlyLDAPConnectionFactory extends Object implements LDAPConnectionFactoryImpl
Modifier and Type | Field and Description |
---|---|
static Option<org.glassfish.grizzly.nio.transport.TCPNIOTransport> |
GRIZZLY_TRANSPORT
Grizzly TCP Transport NIO implementation to use for connections.
|
Constructor and Description |
---|
GrizzlyLDAPConnectionFactory(String host,
int port,
Options options)
Creates a new LDAP connection factory based on Grizzly which can be used to create connections to the Directory
Server at the provided host and port address using provided connection options.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases any resources associated with this connection factory implementation.
|
Promise<LDAPConnectionImpl,LdapException> |
getConnectionAsync()
Asynchronously obtains a connection to the Directory Server associated
with this connection factory.
|
String |
getHostName()
Returns the hostname used by the connections created by this factory.
|
int |
getPort()
Returns the remote port number used by the connections created by this factory.
|
InetSocketAddress |
getSocketAddress()
Returns the address used by the connections created by this factory.
|
public static final Option<org.glassfish.grizzly.nio.transport.TCPNIOTransport> GRIZZLY_TRANSPORT
null
, default transport will be
used.public GrizzlyLDAPConnectionFactory(String host, int port, Options options)
host
- The hostname of the Directory Server to connect to.port
- The port number of the Directory Server to connect to.options
- The LDAP connection options to use when creating connections.public void close()
LDAPConnectionFactoryImpl
close
in interface Closeable
close
in interface AutoCloseable
close
in interface LDAPConnectionFactoryImpl
public Promise<LDAPConnectionImpl,LdapException> getConnectionAsync()
LDAPConnectionFactoryImpl
Promise
can be used to
retrieve the completed connection.getConnectionAsync
in interface LDAPConnectionFactoryImpl
public InetSocketAddress getSocketAddress()
LDAPConnectionFactoryImpl
getSocketAddress
in interface LDAPConnectionFactoryImpl
public String getHostName()
LDAPConnectionFactoryImpl
getHostName
in interface LDAPConnectionFactoryImpl
public int getPort()
LDAPConnectionFactoryImpl
getPort
in interface LDAPConnectionFactoryImpl
Copyright 2010-2017 ForgeRock AS.