File Information
Library: RemotingNG
Package: Transport
Header: Poco/RemotingNG/EventListener.h
Description
The EventListener class extends the Listener interface with methods for managing event subscriptions on the client side.
Inheritance
Direct Base Classes: Listener
All Base Classes: Poco::RefCountedObject, Listener
Known Derived Classes: Poco::RemotingNG::TCP::Listener
Member Summary
Member Functions: subscribeToEvents, unsubscribeFromEvents
Inherited Functions: createURI, duplicate, endPoint, getAuthenticator, getAuthorizer, handlesURI, protocol, referenceCount, registerObject, release, setAuthenticator, setAuthorizer, start, stop, unregisterObject
Types Aliases
Ptr
using Ptr = Poco::AutoPtr < EventListener >;
Constructors
EventListener
EventListener(
const std::string & endPoint
);
Creates an EventListener.
Destructor
~EventListener
virtual ~EventListener();
Destroys the EventListener.
Member Functions
subscribeToEvents
virtual std::string subscribeToEvents(
EventSubscriber::Ptr pEventSubscriber
) = 0;
Register an EventSubscriber to the EventListener.
The EventListener is responsible for sending a protocol-specific subscription request to the server so that events will be delivered from the server to the EventListener.
If necessary for the event delivery protocol, the EventListener is also responsible for assigning a unique ID (or URI) to the registered EventSubscriber instance.
Returns the unique URI that identifies the EventListener if the underlying transport provides one. Otherwise returns an empty string.
unsubscribeFromEvents
virtual void unsubscribeFromEvents(
EventSubscriber::Ptr pEventSubscriber
) = 0;
Unregister an EventSubscriber from the EventListener.
The EventListener is responsible for sending a protocol-specific unsubscription request to the server so that the server will no longer deliver events for this EventSubscriber.