E - the type of message in this topicpublic class TopicProxy<E> extends TopicProxySupport implements ITopic<E>
PARTITIONING_STRATEGY| Constructor and Description | 
|---|
TopicProxy(String name,
          NodeEngine nodeEngine,
          TopicService service)  | 
| Modifier and Type | Method and Description | 
|---|---|
String | 
addMessageListener(MessageListener<E> listener)
Subscribes to this topic. 
 | 
LocalTopicStats | 
getLocalTopicStats()
Returns statistics about this topic, like total number of publishes/receives. 
 | 
void | 
publish(E message)
Publishes the message to all subscribers of this topic. 
 | 
boolean | 
removeMessageListener(String registrationId)
Stops receiving messages for the given message listener. 
 | 
addMessageListenerInternal, getLocalTopicStatsInternal, getName, getServiceName, initialize, publishInternal, removeMessageListenerInternaldestroy, equals, getDistributedObjectName, getNameAsPartitionAwareData, getNodeEngine, getOperationService, getPartitionId, getPartitionKey, getService, hashCode, invalidate, invokeOnPartition, isClusterVersionEqualTo, isClusterVersionGreaterOrEqual, isClusterVersionGreaterThan, isClusterVersionLessOrEqual, isClusterVersionLessThan, isClusterVersionUnknown, isClusterVersionUnknownOrGreaterOrEqual, isClusterVersionUnknownOrGreaterThan, isClusterVersionUnknownOrLessOrEqual, isClusterVersionUnknownOrLessThan, postDestroy, preDestroy, throwNotActiveException, toData, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getPartitionKey, getServiceNamepublic TopicProxy(String name, NodeEngine nodeEngine, TopicService service)
public void publish(E message)
ITopicpublic String addMessageListener(MessageListener<E> listener)
ITopiconMessage() function of the given MessageListener is called. More than one message listener can be added on one instance.
addMessageListener in interface ITopic<E>listener - the MessageListener to addpublic boolean removeMessageListener(String registrationId)
ITopicIf the given listener already removed, this method does nothing.
removeMessageListener in interface ITopic<E>registrationId - ID of listener registrationtrue if registration is removed, false otherwisepublic LocalTopicStats getLocalTopicStats()
ITopicgetLocalTopicStats in interface ITopic<E>Copyright © 2019 Hazelcast, Inc.. All Rights Reserved.