public interface LdapSocket
Support for StartTLS is provided through the usage of StartTlsExtendedRequest
.
Support for SASL quality of protection is provided through the usage of BindRequest
.
Modifier and Type | Method and Description |
---|---|
void |
abort()
Disconnects this socket.
|
void |
abortWithReason(IOException reason)
Disconnects the socket.
|
InetSocketAddress |
getLocalAddress()
Returns the
InetSocketAddress associated with the local system. |
InetSocketAddress |
getRemoteAddress()
Returns the
InetSocketAddress associated with the remote system. |
SaslClient |
getSaslClient()
Returns the
SaslClient currently in use by the underlying connection, or null if SASL integrity
and/or privacy protection is not enabled. |
SaslServer |
getSaslServer()
Returns the
SaslServer currently in use by the underlying connection, or null if SASL integrity
and/or privacy protection is not enabled. |
SSLSession |
getSslSession()
Returns the SSL session currently in use by the underlying connection, or
null if SSL/TLS is not enabled. |
io.reactivex.Flowable<LdapMessage> |
reader()
Returns a
Flowable of LDAP messages read from the network. |
org.reactivestreams.Processor<LdapMessage,LdapMessage> |
writer()
Returns a
Processor which will write all LdapMessage it receives to the network. |
io.reactivex.Flowable<LdapMessage> reader()
Flowable
of LDAP messages read from the network. Message reception is suspended until a
subscriber subscribes to it. Note that no message will be dropped in the mean time.
Any Subscriber
s of this Flowable
will be notified of incoming message, while respecting
back-pressure constraints through the Subscriber.onNext(Object)
.
When this socket is disconnected locally using LdapSocket.abort()
or LdapSocket.writer()
.
onError
/onComplete
, the subscriber will
be notified through Subscriber.onError(Throwable)
with a LdapSocketClosedException
providing the
information about the cause of the disconnection. If the socket has been disconnected by the peer, then the
subscriber will be notified through Subscriber.onComplete()
.
Note that invoking this method multiple times returns the same Flowable
instance until
Subscription.cancel()
. This invocation will not close this socket but suspend message reception until
this method is invoked again and the new returned Flowable
instance is subscribed.
LdapMessage
s read from the network.IllegalStateException
- If the returned stream has already been subscribed. The exception will be propagated through the
Subscriber.onError(Throwable)
org.reactivestreams.Processor<LdapMessage,LdapMessage> writer()
Processor
which will write all LdapMessage
it receives to the network. The publisher
must respect back-pressure constraints implied by the returned subscriber. The back-pressure constraints reflect
the capacity of the remote peer to read the flow of messages.
When this socket is disconnected, the Subscriber
of this writer will be signaled with an error and the
Subscription.request(long)
will no longer be invoked.
It is not possible to subscribe to multiple publishers with the returned subscriber instance.
Processor
transmitting all messages to the network. This processor does not signal anything, it
only propagates the received completion or error signals.InetSocketAddress getLocalAddress()
InetSocketAddress
associated with the local system.InetSocketAddress
associated with the local system.InetSocketAddress getRemoteAddress()
InetSocketAddress
associated with the remote system.InetSocketAddress
associated with the remote system.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.SaslClient getSaslClient()
SaslClient
currently in use by the underlying connection, or null
if SASL integrity
and/or privacy protection is not enabled.SaslClient
currently in use by the underlying connection, or null
if SASL integrity
and/or privacy protection is not enabled.void abort()
LdapSocket.reader()
's
Subscriber.onError(Throwable)
with a LdapSocketClosedException
and will
cancel
the LdapSocket.writer()
's publisher. All messages which have not yet been
sent will be dropped.void abortWithReason(IOException reason)
LdapSocket.reader()
's
Subscriber.onError(Throwable)
with a LdapSocketClosedException
and will
cancel
the LdapSocket.writer()
's publisher. All messages which have not yet been
sent will be dropped.reason
- The reason which will be embedded into the LdapSocketClosedException
Copyright © 2010-2018, ForgeRock All Rights Reserved.