public interface Topic<T extends Serializable>
Modifier and Type | Method and Description |
---|---|
TopicSettings<T> |
getSettings() |
void |
publish(T message)
Publishes a message to all (both local and on other cluster nodes) listeners of the topic.
|
String |
subscribe(TopicListener<T> listener)
Subscribes the provided listener to the topic.
|
boolean |
unsubscribe(String subscriptionId)
Unsubscribes a listener.
|
@Nonnull TopicSettings<T> getSettings()
void publish(@Nonnull T message)
message
- the message@Nonnull String subscribe(@Nonnull TopicListener<T> listener)
listener
- the listener that should receive callbacks when a message is published to the topicunsubscribe
.boolean unsubscribe(@Nonnull String subscriptionId)
subscriptionId
- the subscription ID that was returned by subscribe(TopicListener)
true
if the listener was successfully unsubscribed, otherwise false
Copyright © 2019 Atlassian. All rights reserved.