public interface TopicTreeHandler
session
at a particular branch of
the topic tree.Modifier and Type | Interface and Description |
---|---|
static class |
TopicTreeHandler.Default
Skeleton topic tree handler implementation.
|
Modifier and Type | Method and Description |
---|---|
void |
onClose(String topicPath)
Called if the handler is closed.
|
void |
onError(String topicPath,
ErrorReason errorReason)
Notification of a contextual error related to this handler.
|
void |
onRegistered(String topicPath,
Registration registration)
Called when the handler has been successfully registered with the server.
|
void onRegistered(String topicPath, Registration registration)
A session can register a single handler of each type for a given branch
of the topic tree. If there is already a handler registered for the topic
path the operation will fail, registration
will be closed,
and the session error handler will be notified. To change the handler,
first close
the previous handler.
topicPath
- the path that the handler is active forregistration
- allows the handler to be closedvoid onClose(String topicPath)
close
.
No further calls will be made for the handler.
topicPath
- the branch of the topic tree for which the handler was
registeredvoid onError(String topicPath, ErrorReason errorReason)
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.topicPath
- the branch of the topic tree for which the handler was
registerederrorReason
- a value representing the error; this can be one of
constants defined in ErrorReason
, or a feature-specific
reasonCopyright © 2020 Push Technology Ltd. All Rights Reserved.