18 #ifndef HAZELCAST_TOPIC
19 #define HAZELCAST_TOPIC
21 #include "hazelcast/client/proxy/ITopicImpl.h"
22 #include "hazelcast/client/topic/impl/TopicEventHandlerImpl.h"
41 class ITopic :
public proxy::ITopicImpl {
52 proxy::ITopicImpl::publish(toData<E>(message));
81 impl::BaseEventHandler *topicEventHandler =
new topic::impl::TopicEventHandlerImpl<E>(getName(),
82 context->getClusterService(),
83 context->getSerializationService(),
85 return proxy::ITopicImpl::addMessageListener(topicEventHandler);
97 return proxy::ITopicImpl::removeMessageListener(registrationId);
101 ITopic(
const std::string& instanceName, spi::ClientContext *context)
102 : proxy::ITopicImpl(instanceName, context) {
108 #endif //HAZELCAST_TOPIC
void publish(const E &message)
Publishes the message to all subscribers of this topic.
Definition: ITopic.h:51
Hazelcast provides distribution mechanism for publishing messages that are delivered to multiple subs...
Definition: ITopic.h:41
bool removeMessageListener(const std::string ®istrationId)
Stops receiving messages for the given message listener.
Definition: ITopic.h:96
std::string addMessageListener(L &listener)
Subscribes to this topic.
Definition: ITopic.h:80
Definition: MapEntryView.h:32
Hazelcast Client enables you to do all Hazelcast operations without being a member of the cluster...
Definition: HazelcastClient.h:459