Package org.forgerock.opendj.ldap
Interface LdapSession
-
public interface LdapSessionServer side representation of a connected LDAP client. An LDAP session 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.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddisconnect()Disconnects the client without sending a disconnect notification.voiddisconnect(ResultCode resultCode, CharSequence diagnosticMessage)Disconnects the client and sends a disconnect notification, containing the provided result code and diagnostic message.InetSocketAddressgetLocalAddress()Returns theInetSocketAddressassociated with the local system.ProxyProtocolHeadergetProxyProtocolHeader()Returns the proxy protocol header sent by the client, ornullif the proxy protocol is disabled.InetSocketAddressgetRemoteAddress()Returns theInetSocketAddressassociated with the remote system.intgetSecurityStrengthFactor()Returns the cipher strength, in bits, currently in use by the underlying connection.SSLSessiongetSslSession()Returns the SSL session currently in use by the underlying connection, ornullif SSL/TLS is not enabled.CompletableonClose()Returns aCompletablewhich will signalonCompletewhen the client disconnects oronErrorif the server disconnects the client.CompletablesendUnsolicitedNotification(ExtendedResult notification)Sends an unsolicited notification to the client.
-
-
-
Method Detail
-
onClose
Completable onClose()
Returns aCompletablewhich will signalonCompletewhen the client disconnects oronErrorif the server disconnects the client.- Returns:
- A
Completablewhich will complete or fail when this session is terminated.
-
disconnect
void disconnect()
Disconnects the client without sending a disconnect notification. Invoking this method causesonClose()to fail with the errorRxSocket.LOCAL_CLOSE.
-
disconnect
void disconnect(ResultCode resultCode, CharSequence diagnosticMessage)
Disconnects the client and sends a disconnect notification, containing the provided result code and diagnostic message. Invoking this method causesonClose()to fail with the errorRxSocket.LOCAL_CLOSE.- Parameters:
resultCode- The result code to include with the disconnect notificationdiagnosticMessage- The diagnostic message to include with the disconnect notification
-
getLocalAddress
InetSocketAddress getLocalAddress()
Returns theInetSocketAddressassociated with the local system.- Returns:
- The
InetSocketAddressassociated with the local system.
-
getRemoteAddress
InetSocketAddress getRemoteAddress()
Returns theInetSocketAddressassociated with the remote system.- Returns:
- The
InetSocketAddressassociated with the remote system.
-
getSecurityStrengthFactor
int getSecurityStrengthFactor()
Returns the cipher strength, in bits, currently in use by the underlying connection. This value is analogous to thejavax.servlet.request.key_sizeproperty 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.- Returns:
- The cipher strength, in bits, currently in use by the underlying connection.
-
getSslSession
SSLSession getSslSession()
Returns the SSL session currently in use by the underlying connection, ornullif SSL/TLS is not enabled.- Returns:
- The SSL session currently in use by the underlying connection, or
nullif SSL/TLS is not enabled.
-
sendUnsolicitedNotification
Completable sendUnsolicitedNotification(ExtendedResult notification)
Sends an unsolicited notification to the client.- Parameters:
notification- The notification to send.- Returns:
- A
Completablewhich will be completed once the notification has been sent.
-
getProxyProtocolHeader
ProxyProtocolHeader getProxyProtocolHeader()
Returns the proxy protocol header sent by the client, ornullif the proxy protocol is disabled.- Returns:
- The proxy protocol header sent by the client, or
nullif the proxy protocol is disabled.
-
-