|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.unboundid.ldap.sdk.StartTLSPostConnectProcessor
@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class StartTLSPostConnectProcessor
This class provides an implementation of a post-connect processor that can
be used to perform StartTLS negotiation on an LDAP connection that is
intended to be used in a connection pool.
SSLUtil sslUtil =
new SSLUtil(new TrustStoreTrustManager("/my/trust/store/file"));
SSLContext sslContext = sslUtil.createSSLContext();
LDAPConnection connection = new LDAPConnection("server.example.com", 389);
ExtendedResult startTLSResult = connection.processExtendedOperation(
new StartTLSExtendedRequest(sslContext);
BindResult bindResult = connection.bind(
"uid=john.doe,ou=People,dc=example,dc=com", "password");
StartTLSPostConnectProcessor startTLSProcessor =
new StartTLSPostConnectProcessor(sslContext);
LDAPConnectionPool pool =
new LDAPConnectionPool(connection, 1, 10, startTLSProcessor);
| Constructor Summary | |
|---|---|
StartTLSPostConnectProcessor(javax.net.ssl.SSLContext sslContext)
Creates a new instance of this StartTLS post-connect processor that will use the provided SSL context. |
|
| Method Summary | |
|---|---|
void |
processPostAuthenticatedConnection(LDAPConnection connection)
Performs any appropriate processing on the provided connection before making it available for use in a connection pool. |
void |
processPreAuthenticatedConnection(LDAPConnection connection)
Performs any appropriate processing on the provided connection before making it available for use in a connection pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StartTLSPostConnectProcessor(javax.net.ssl.SSLContext sslContext)
sslContext - The SSL context to use to perform the StartTLS
negotiation. It must not be null.| Method Detail |
|---|
public void processPreAuthenticatedConnection(LDAPConnection connection)
throws LDAPException
processPreAuthenticatedConnection in interface PostConnectProcessorconnection - The connection for which the processing is to be
performed.
LDAPException - If a problem occurs during processing. If an
exception is thrown, then the connection will be
terminated and not used in the pool.
public void processPostAuthenticatedConnection(LDAPConnection connection)
throws LDAPException
processPostAuthenticatedConnection in interface PostConnectProcessorconnection - The connection for which the processing is to be
performed.
LDAPException - If a problem occurs during processing. If an
exception is thrown, then the connection will be
terminated and not used in the pool.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||