public static interface TopicControl.MissingTopicNotificationStream extends Stream
Instances can be registered using
addMissingTopicHandler
.
†Missing topic notifications only occur when using the deprecated
Topics.fetch(com.pushtechnology.diffusion.client.topics.TopicSelector, com.pushtechnology.diffusion.client.features.Topics.FetchStream)
mechanism. The newer Topics.fetchRequest()
mechanism does not generate missing topic notifications.
Modifier and Type | Interface and Description |
---|---|
static class |
TopicControl.MissingTopicNotificationStream.Default
|
Modifier and Type | Method and Description |
---|---|
void |
onMissingTopic(TopicControl.MissingTopicNotification notification)
Called when a session requests a topic that does not exist, and the
topic path belongs to part of the topic tree for which this handler
was registered.
|
void onMissingTopic(TopicControl.MissingTopicNotification notification)
The implementation should take the appropriate action (for example,
create the topic), and then call
proceed
on the supplied
notification
. This allows the session request to continue and
successfully resolve against the topic if it was created.
Alternatively, the handler can call
cancel
to discard the
request. A handler should always call proceed
or
cancel
, otherwise resources will continue to be reserved on
the server and the session's request will not complete.
notification
- the missing topic notificationCopyright © 2020 Push Technology Ltd. All Rights Reserved.