public static class ServerHandler.Default extends Object implements ServerHandler
The methods on this handler log callbacks at debug level.
ServerHandler.Default
Constructor and Description |
---|
Default() |
Modifier and Type | Method and Description |
---|---|
void |
onClose()
Called if the handler is closed.
|
void |
onError(ErrorReason errorReason)
Notification of a contextual error related to this handler.
|
void |
onRegistered(Registration registration)
Called when the handler has been successfully registered with the server.
|
public void onRegistered(Registration registration)
ServerHandler
A session can register at most one a single handler of each type. If
there is already a handler registered the operation will fail,
registeredHandler
will be closed, and the session error handler
will be notified. To change the handler, first
close
the previous handler.
onRegistered
in interface ServerHandler
registration
- a reference that allows the handler to be closedpublic void onClose()
ServerHandler
close
.
No further calls will be made for the handler.
onClose
in interface ServerHandler
public void onError(ErrorReason errorReason)
ServerHandler
onError
is called include the session being closed before the
handler is registered, a communication timeout, or a problem with the
provided parameters. No further calls will be made to this handler.onError
in interface ServerHandler
errorReason
- a value representing the error; this can be one of
constants defined in ErrorReason
, or a feature-specific
reasonCopyright © 2022 Push Technology Ltd. All Rights Reserved.