Package com.atlassian.bitbucket.topic
Interface Topic<T extends Serializable>
public interface Topic<T extends Serializable>
- Since:
- 5.3
- 
Method SummaryModifier and TypeMethodDescriptionvoidPublishes a message to all (both local and on other cluster nodes) listeners of the topic.subscribe(TopicListener<T> listener) Subscribes the provided listener to the topic.booleanunsubscribe(String subscriptionId) Unsubscribes a listener.
- 
Method Details- 
getSettings- Returns:
- the topic configuration
 
- 
publishPublishes a message to all (both local and on other cluster nodes) listeners of the topic.- Parameters:
- message- the message
 
- 
subscribeSubscribes the provided listener to the topic. The listener will receive callbacks for every message published to the topic after the listener was subscribed.- Parameters:
- listener- the listener that should receive callbacks when a message is published to the topic
- Returns:
- the subscription ID, used to unsubscribe.
 
- 
unsubscribeUnsubscribes a listener. The listener will receive no more messages from the topic.- Parameters:
- subscriptionId- the subscription ID that was returned by- subscribe(TopicListener)
- Returns:
- trueif the listener was successfully unsubscribed, otherwise- false
 
 
-