E - message typepublic class ClientTopicProxy<E> extends ClientProxy implements ITopic<E>
ITopic.name| Constructor and Description | 
|---|
| ClientTopicProxy(String serviceName,
                String objectId) | 
| 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 | 
| protected ClientMessage | invokeOnPartition(ClientMessage req) | 
| protected <T> ClientDelegatingFuture<T> | invokeOnPartitionAsync(ClientMessage clientMessage,
                      ClientMessageDecoder clientMessageDecoder) | 
| protected <T> T | invokeOnPartitionInterruptibly(ClientMessage clientMessage) | 
| protected void | onInitialize()Called when proxy is created. | 
| 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. | 
| String | toString() | 
deregisterListener, destroy, equals, getClient, getContext, getDistributedObjectName, getId, getName, getPartitionKey, getSerializationService, getServiceName, hashCode, invoke, invoke, invokeOnPartition, invokeOnPartitionInterruptibly, onDestroy, onShutdown, postDestroy, preDestroy, registerListener, setContext, toData, toObjectclone, finalize, getClass, notify, notifyAll, wait, wait, waitdestroy, getPartitionKey, getServiceNamepublic void publish(E message)
ITopicpublic String addMessageListener(MessageListener<E> listener)
ITopicaddMessageListener in interface ITopic<E>listener - the MessageListener to add.public boolean removeMessageListener(String registrationId)
ITopicremoveMessageListener in interface ITopic<E>registrationId - Id of listener registration.public LocalTopicStats getLocalTopicStats()
ITopicgetLocalTopicStats in interface ITopic<E>protected void onInitialize()
ClientProxyonInitialize in class ClientProxyprotected ClientMessage invokeOnPartition(ClientMessage req)
protected <T> T invokeOnPartitionInterruptibly(ClientMessage clientMessage) throws InterruptedException
InterruptedExceptionprotected <T> ClientDelegatingFuture<T> invokeOnPartitionAsync(ClientMessage clientMessage, ClientMessageDecoder clientMessageDecoder)
Copyright © 2016 Hazelcast, Inc.. All Rights Reserved.