Interface LdapSocket
-
- All Superinterfaces:
AutoCloseable
,Closeable
,RxSocket<LdapMessage>
public interface LdapSocket extends RxSocket<LdapMessage>
A reactive socket implementation representing a stream of LDAP messages. LDAP sockets are role agnostic and may be used for implementing LDAP clients and servers.Support for StartTLS is provided through the usage of
StartTlsExtendedRequest
. Support for SASL quality of protection is provided through the usage ofBindRequest
.
-
-
Field Summary
-
Fields inherited from interface org.forgerock.opendj.io.RxSocket
LOCAL_CLOSE, REMOTE_CLOSE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ProxyProtocolHeader
getProxyProtocolHeader()
Returns the proxy protocol header sent by the client, ornull
if proxy protocol is not enabled.Object
getSaslNegotiatedProperty(String property)
Returns the specified SASL negotiated property if this socket is using SASL QOP to protect the underlying communication.SSLSession
getSslSession()
Returns the SSL session currently in use by the underlying connection, ornull
if SSL/TLS is not enabled.default Flowable<LdapMessage>
read()
Returns a "cold"Flowable
representing the stream of LDAP messages read from the network.-
Methods inherited from interface org.forgerock.opendj.io.RxSocket
close, closeWithReason, getLocalAddress, getRemoteAddress, read, write
-
-
-
-
Method Detail
-
read
@CheckReturnValue default Flowable<LdapMessage> read()
Returns a "cold"Flowable
representing the stream of LDAP messages read from the network.Incoming messages will be buffered until they are read. Note that invoking this method multiple times returns the same
Flowable
instance. The returnedFlowable
will not allow multiple concurrent subscriptions as this will result in non-deterministic behavior. Attempts to have multiple concurrent subscriptions will result in anIllegalStateException
.Subscribers will be notified when the socket is closed through
Subscriber.onError(Throwable)
with the correspondingIOException
providing the reason for the disconnection. In particular, if the socket is closed locally viaRxSocket.close()
then it will be notified withRxSocket.LOCAL_CLOSE
, if it is closed locally viaRxSocket.closeWithReason(java.lang.Throwable)
then it will be notified using the provided exception and finally, if it is closed remotely by the peer, then it will be notified usingRxSocket.REMOTE_CLOSE
.- Returns:
- A "cold"
Flowable
representing the stream of LDAP messages read from the network.
-
getSslSession
SSLSession getSslSession()
Returns the SSL session currently in use by the underlying connection, ornull
if SSL/TLS is not enabled.- Returns:
- The SSL session currently in use by the underlying connection, or
null
if SSL/TLS is not enabled.
-
getSaslNegotiatedProperty
Object getSaslNegotiatedProperty(String property)
Returns the specified SASL negotiated property if this socket is using SASL QOP to protect the underlying communication.- Parameters:
property
- The SASL negotiated property name.- Returns:
- The value of the SASL negotiated property, or
null
if SASL QOP is not active or if the property was not negotiated or is not applicable to this mechanism.
-
getProxyProtocolHeader
ProxyProtocolHeader getProxyProtocolHeader()
Returns the proxy protocol header sent by the client, ornull
if proxy protocol is not enabled.- Returns:
- The proxy protocol header sent by the client, or
null
if proxy protocol is not enabled.
-
-