CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
notify::Subscriber Class Referenceabstract

#include <subscriber.h>

Inheritance diagram for notify::Subscriber:

Public Types

enum  Status { kContinue, kFinish, kError }
 

Public Member Functions

 Subscriber ()
 
virtual ~Subscriber ()
 
virtual bool Subscribe (const std::string &topic)=0
 
virtual void Unsubscribe ()
 

Protected Member Functions

virtual Status Consume (const std::string &topic, const std::string &msg_text)=0
 

Detailed Description

Base class for creating a subscription to the notification system

Definition at line 15 of file subscriber.h.

Member Enumeration Documentation

Enumerator
kContinue 
kFinish 
kError 

Definition at line 17 of file subscriber.h.

Constructor & Destructor Documentation

notify::Subscriber::Subscriber ( )
inline

Definition at line 23 of file subscriber.h.

virtual notify::Subscriber::~Subscriber ( )
inlinevirtual

Definition at line 24 of file subscriber.h.

Member Function Documentation

virtual Status notify::Subscriber::Consume ( const std::string &  topic,
const std::string &  msg_text 
)
protectedpure virtual

Consume a message

Consume the message and return the status value that can be used to exit the subscription loop.

Implemented in anonymous_namespace{cmd_sub.cc}::SwissknifeSubscriber, and anonymous_namespace{notification_client.cc}::ActivitySubscriber.

Referenced by notify::SubscriberSSE::CurlRecvCB().

Here is the caller graph for this function:

virtual bool notify::Subscriber::Subscribe ( const std::string &  topic)
pure virtual

Subscribe to a specific message topic

The only topics currently used by the notification system are repository names. The subscription delivers activity messages containing the current repository manifest. Returns false if an error occurred.

Implemented in notify::SubscriberSSE.

Referenced by notify::SubscriberSupervisor::Task().

Here is the caller graph for this function:

virtual void notify::Subscriber::Unsubscribe ( )
inlinevirtual

Unsubscribe

Cancel an active subscription

Reimplemented in notify::SubscriberSSE.

Definition at line 40 of file subscriber.h.


The documentation for this class was generated from the following file: