public final class LdapSocketClosedException extends IOException
LdapSocket
has been closed locally.Modifier and Type | Method and Description |
---|---|
static LdapSocketClosedException |
fatalError(Throwable cause)
Returns a
LdapSocketClosedException specifying that the socket has been closed locally as a result of a
fatal error. |
static LdapSocketClosedException |
gracefullyClosed()
Returns a
LdapSocketClosedException specifying that the socket has been intentionally and gracefully
closed locally. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static LdapSocketClosedException gracefullyClosed()
LdapSocketClosedException
specifying that the socket has been intentionally and gracefully
closed locally.
The returned exception reflects an expected end of connection. As an example this can be used by a server to
disconnect gracefully a client after receiving an
UnbindRequest
. On the client-side, the exception can be
used when a process has completed and needs to release resources (e.g: after receiving the result of a request).
Because the close is intentional, Throwable.getCause()
will always return null
.
LdapSocketClosedException
public static LdapSocketClosedException fatalError(Throwable cause)
LdapSocketClosedException
specifying that the socket has been closed locally as a result of a
fatal error.
The returned exception reflects an unexpected end of connection. As an example this can be used by a server to disconnect a client after receiving invalid data.
Because the close is the result of a fatal error, Throwable.getCause()
will return the reason for the
disconnection.
cause
- The reason why the connection has been closed.LdapSocketClosedException
Copyright © 2010-2018, ForgeRock All Rights Reserved.