public static interface TopicUpdateControl.UpdateSource extends TopicTreeHandler
Registering as an update source for a particular point in the topic tree allows a client to update all topics below that point in the tree. There is no need to subscribe to a topic in order to update it.
When an update source is registered it will be notified via the
onRegistered
callback. Once registered it may be in either a active
state,
where it can provide topic updates, or a standby
state, where it
is still registered but is not allowed to perform updates. An update
source may switch between these states in any order, depending on server
policy.
Modifier and Type | Interface and Description |
---|---|
static class |
TopicUpdateControl.UpdateSource.Default
Default
TopicUpdateControl.UpdateSource implementation. |
Modifier and Type | Method and Description |
---|---|
void |
onActive(String topicPath,
TopicUpdateControl.Updater updater)
State notification that this source is now active for the specified
topic path, and is therefore in a valid state to send updates on
topics at or below the registered topic path.
|
void |
onStandby(String topicPath)
Notification that this source is not currently allowed to provide
topic updates for the specified topic path.
|
onClose, onError, onRegistered
void onActive(String topicPath, TopicUpdateControl.Updater updater)
topicPath
- the registration pathupdater
- an updater that may be used to update topics at or
below the registered path. It is recommended that
TopicUpdateControl.Updater.valueUpdater(java.lang.Class<V>)
is used to obtain an updater
specific to certain topic types.void onStandby(String topicPath)
Server policy will dictate when this UpdateSource is set to be active.
If this UpdateSource was previously in an active
state, any
updater
instances for this topic path will no longer
be valid for use.
topicPath
- the registration pathCopyright © 2020 Push Technology Ltd. All Rights Reserved.