public interface LDAPClientContext
ServerConnectionFactory. An
LDAP client context can be used to query information about the client's
connection such as their network address, as well as managing the state of
the connection.| Modifier and Type | Method and Description |
|---|---|
void |
addListener(LDAPClientContextEventListener listener)
Register a listener which will be notified when this
LDAPClientContext changes state. |
void |
disconnect()
Disconnects the client without sending a disconnect notification.
|
void |
disconnect(ResultCode resultCode,
String diagnosticMessage)
Disconnects the client and sends a disconnect notification, containing the provided result code and diagnostic
message.
|
boolean |
enableSASL(SaslServer saslServer)
Installs the SASL security layer on the underlying connection.
|
boolean |
enableTLS(SSLEngine sslEngine,
boolean startTls)
Installs the TLS/SSL security layer on the underlying connection.
|
InetSocketAddress |
getLocalAddress()
Returns the
InetSocketAddress associated with the local system. |
InetSocketAddress |
getPeerAddress()
Returns the
InetSocketAddress associated with the remote system. |
SaslServer |
getSASLServer()
Returns the
SaslServer currently in use by the underlying connection, or
null if SASL integrity and/or privacy protection is not enabled. |
int |
getSecurityStrengthFactor()
Returns the cipher strength, in bits, currently in use by the underlying
connection.
|
SSLSession |
getSSLSession()
Returns the SSL session currently in use by the underlying connection, or
null if SSL/TLS is not enabled. |
boolean |
isClosed()
Returns
true if the underlying connection has been closed as a
result of a client disconnect, a fatal connection error, or a server-side
disconnect(). |
com.forgerock.reactive.Completable |
sendUnsolicitedNotification(ExtendedResult notification)
Sends an unsolicited notification to the client.
|
void addListener(LDAPClientContextEventListener listener)
LDAPClientContext changes state.listener - The LDAPClientContextEventListener to register.void disconnect()
LDAPClientContextEventListener.handleConnectionDisconnected(LDAPClientContext, ResultCode, String) to be
called before this method returns.void disconnect(ResultCode resultCode, String diagnosticMessage)
LDAPClientContextEventListener.handleConnectionDisconnected(LDAPClientContext, ResultCode, String) to be
called before this method returns.resultCode - The result code to include with the disconnect notificationdiagnosticMessage - The diagnostic message to include with the disconnect notificationInetSocketAddress getLocalAddress()
InetSocketAddress associated with the local system.InetSocketAddress associated with the local system.InetSocketAddress getPeerAddress()
InetSocketAddress associated with the remote system.InetSocketAddress associated with the remote system.int getSecurityStrengthFactor()
javax.servlet.request.key_size property defined in the Servlet
specification (section 3.8 "SSL Attributes"). It provides no indication
of the relative strength of different cipher algorithms, their known
weaknesses, nor the strength of other cryptographic information used
during SSL/TLS negotiation.SSLSession getSSLSession()
null if SSL/TLS is not enabled.null if SSL/TLS is not enabled.SaslServer getSASLServer()
SaslServer currently in use by the underlying connection, or
null if SASL integrity and/or privacy protection is not enabled.SaslServer currently in use by the underlying connection, or
null if SASL integrity and/or privacy protection is not enabled.boolean isClosed()
true if the underlying connection has been closed as a
result of a client disconnect, a fatal connection error, or a server-side
disconnect().
This method provides a polling mechanism which can be used by synchronous request handler implementations to detect connection termination.
Server connections: this method will always return true
when called from within handleConnectionClosed,
handleConnectionDisconnected, or
handleConnectionError.
true if the underlying connection has been closed.com.forgerock.reactive.Completable sendUnsolicitedNotification(ExtendedResult notification)
notification - The notification to send.Completable which will be completed once the notification has been sent.boolean enableTLS(SSLEngine sslEngine, boolean startTls)
sslEngine - The SSLEngine which should be used to secure the connection.startTls - Must be true if the TLS filter has to be installed as a consequence of a StartTLS request
performed by a client. When true the TLS filter will be installed atomically after the first
message sent to prevent race-condition.true if the TLS filter has been enabled, false if it was already enabled.NullPointerException - if sslEngine is nullboolean enableSASL(SaslServer saslServer)
saslServer - The SaslServer which should be used to secure the connection.true if the SASL filter has been enabled, false if it was already enabled.NullPointerException - if saslServer is nullCopyright © 2017-2020 Wren Security. All Rights Reserved.