|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProtocolListener
The listener for incoming protocol connections.
| Method Summary | |
|---|---|
void |
newLogin(Identity identity,
SessionProtocol protocol,
RequestCompletionHandler<SessionProtocolHandler> completionHandler)
Handles a new login request for the specified identity and
corresponding protocol, and when this listener has completed
processing the request, invokes the
completed method on the
given completionHandler with a Future containing
the result of the login request. |
void |
relocatedSession(BigInteger relocationKey,
SessionProtocol protocol,
RequestCompletionHandler<SessionProtocolHandler> completionHandler)
Re-establishes an existing client session corresponding to the specified relocationKey, and when this listener has
completed processing this request, invokes the
completed method on the
given completionHandler with a Future containing
the result of this request. |
| Method Detail |
|---|
void newLogin(Identity identity,
SessionProtocol protocol,
RequestCompletionHandler<SessionProtocolHandler> completionHandler)
identity and
corresponding protocol, and when this listener has completed
processing the request, invokes the
completed method on the
given completionHandler with a Future containing
the result of the login request.
If the login request is processed successfully, then invoking the
get method on the future supplied to the completed method returns the SessionProtocolHandler for
processing incoming requests received by the protocol.
If the login was unsuccessful, the get method throws
ExecutionException which contains a cause that
indicates why the login failed. The getCause method will return one of the following exceptions:
LoginRedirectException: indicates that the login should
be redirected to the node whose ID is returned by the exception's getNodeId method. LoginFailureException: indicates that the login failed.
The exception's getReason
method returns the reason for the failure. If the reason is FailureReason.DUPLICATE_LOGIN, then
the server rejected the login because of an existing session with
the same identity. If the reason is FailureReason.REJECTED_LOGIN, then the
application rejected the login. If the reason is FailureReason.SERVER_UNAVAILABLE,
then the server is temporarily unavailable. If the reason is FailureReason.OTHER, then the exception's
getCause method returns the cause
of the login failure.
identity - an identityprotocol - a session protocolcompletionHandler - a completion handler
void relocatedSession(BigInteger relocationKey,
SessionProtocol protocol,
RequestCompletionHandler<SessionProtocolHandler> completionHandler)
relocationKey, and when this listener has
completed processing this request, invokes the
completed method on the
given completionHandler with a Future containing
the result of this request.
If the relocation request is processed successfully, then
invoking the get method on the future supplied to
the completed method returns the SessionProtocolHandler for processing incoming requests received by
the protocol.
If the relocation request was unsuccessful, the get
method throws ExecutionException which contains a
cause that indicates why the relocation failed. The getCause method will return a RelocateFailureException with one of the following failure
reasons:
FailureReason.DUPLICATE_LOGIN: the server rejected the relocation
because of an existing session with the same identity.
FailureReason.SERVER_UNAVAILABLE: the server is temporarily
unavailable.
FailureReason.OTHER: another
exception occured. The exception's getCause method returns the cause of the relocation
failure.
relocationKey - a relocationKeyprotocol - a session protocolcompletionHandler - a completion handler
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||