CppMicroServices

C++ Micro Services: ServiceListenerHook Struct Reference
ServiceListenerHook Struct Referenceabstract

Service Listener Hook Service. More...

Classes

struct  ListenerInfo
 Information about a Service Listener. More...
 

Public Member Functions

virtual ~ServiceListenerHook ()
 
virtual void Added (const std::vector< ListenerInfo > &listeners)=0
 Added listeners hook method. More...
 
virtual void Removed (const std::vector< ListenerInfo > &listeners)=0
 Removed listeners hook method. More...
 

Detailed Description

Service Listener Hook Service.

Modules registering this service will be called during service listener addition and removal.

Remarks
Implementations of this interface are required to be thread-safe.

Constructor & Destructor Documentation

virtual ServiceListenerHook::~ServiceListenerHook ( )
virtual

Member Function Documentation

virtual void ServiceListenerHook::Added ( const std::vector< ListenerInfo > &  listeners)
pure virtual

Added listeners hook method.

This method is called to provide the hook implementation with information on newly added service listeners. This method will be called as service listeners are added while this hook is registered. Also, immediately after registration of this hook, this method will be called to provide the current collection of service listeners which had been added prior to the hook being registered.

Parameters
listenersA collection of ListenerInfo objects for newly added service listeners which are now listening to service events.
virtual void ServiceListenerHook::Removed ( const std::vector< ListenerInfo > &  listeners)
pure virtual

Removed listeners hook method.

This method is called to provide the hook implementation with information on newly removed service listeners. This method will be called as service listeners are removed while this hook is registered.

Parameters
listenersA collection of ListenerInfo objects for newly removed service listeners which are no longer listening to service events.