CernVM-FS
2.12.0
|
#include <subscriber.h>
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 |
Base class for creating a subscription to the notification system
Definition at line 15 of file subscriber.h.
Enumerator | |
---|---|
kContinue | |
kFinish | |
kError |
Definition at line 17 of file subscriber.h.
|
inline |
Definition at line 23 of file subscriber.h.
|
inlinevirtual |
Definition at line 24 of file subscriber.h.
|
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().
|
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().
|
inlinevirtual |
Unsubscribe
Cancel an active subscription
Reimplemented in notify::SubscriberSSE.
Definition at line 40 of file subscriber.h.