public class VanillaTopicPublisher<T,M> extends Object implements TopicPublisher<T,M>
| Constructor and Description |
|---|
VanillaTopicPublisher(RequestContext context,
Asset asset,
MapView<T,M,M> underlying) |
| Modifier and Type | Method and Description |
|---|---|
Asset |
asset() |
void |
publish(T topic,
M message)
Publish to a provided topic.
|
void |
registerTopicSubscriber(TopicSubscriber<T,M> topicSubscriber)
Add a subscription to this group.
|
MapView<T,M,M> |
underlying() |
void |
unregisterTopicSubscriber(TopicSubscriber<T,M> topicSubscriber)
Unregister a TopicSubscriber
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitkeyedViewpublic VanillaTopicPublisher(@NotNull
RequestContext context,
Asset asset,
@NotNull
MapView<T,M,M> underlying)
throws AssetNotFoundException
AssetNotFoundExceptionpublic void publish(T topic, M message)
TopicPublisherpublish in interface TopicPublisher<T,M>topic - to publish tomessage - to publish.public Asset asset()
public void registerTopicSubscriber(TopicSubscriber<T,M> topicSubscriber) throws AssetNotFoundException
TopicPublisherregisterTopicSubscriber in interface TopicPublisher<T,M>topicSubscriber - to listen to events.AssetNotFoundException - if the Asset is no longer valid.public void unregisterTopicSubscriber(TopicSubscriber<T,M> topicSubscriber)
TopicPublisherunregisterTopicSubscriber in interface TopicPublisher<T,M>topicSubscriber - to unregisterCopyright © 2015. All rights reserved.