C
- The type of request context.public interface ServerConnection<C> extends RequestHandler<C>
ServerConnection
is associated with a client connection when the
handleAccept
method is
invoked against a ServerConnectionFactory
.
Implementations are responsible for handling connection life-cycle as well as
request life-cycle. In particular, a ServerConnection
is responsible
for processing abandon and unbind requests, as well as extended operations
such as StartTLS
and Cancel
operations.
ServerConnectionFactory
Modifier and Type | Method and Description |
---|---|
void |
handleAbandon(C requestContext,
AbandonRequest request)
Invoked when an abandon request is received from a client.
|
void |
handleConnectionClosed(C requestContext,
UnbindRequest request)
Invoked when the client closes the connection, possibly using an unbind
request.
|
void |
handleConnectionDisconnected(ResultCode resultCode,
String message)
Invoked when the server disconnects the client connection, possibly using
a disconnect notification.
|
void |
handleConnectionError(Throwable error)
Invoked when an error occurs on the connection and it is no longer
usable.
|
handleAdd, handleBind, handleCompare, handleDelete, handleExtendedRequest, handleModify, handleModifyDN, handleSearch
void handleAbandon(C requestContext, AbandonRequest request)
requestContext
- The request context.request
- The abandon request.UnsupportedOperationException
- If this server connection does not handle abandon requests.void handleConnectionClosed(C requestContext, UnbindRequest request)
requestContext
- The request context which should be ignored if there was no
associated unbind request.request
- The unbind request, which may be null
if one was not
sent before the connection was closed.void handleConnectionDisconnected(ResultCode resultCode, String message)
resultCode
- The result code which was included with the disconnect
notification, or null
if no disconnect notification
was sent.message
- The diagnostic message, which may be empty or null
indicating that none was provided.void handleConnectionError(Throwable error)
error
- The exception describing the problem that occurred.Copyright 2010-2017 ForgeRock AS.