|
LSSTApplications
8.0.0.0+107,8.0.0.1+13,9.1+18,9.2,master-g084aeec0a4,master-g0aced2eed8+6,master-g15627eb03c,master-g28afc54ef9,master-g3391ba5ea0,master-g3d0fb8ae5f,master-g4432ae2e89+36,master-g5c3c32f3ec+17,master-g60f1e072bb+1,master-g6a3ac32d1b,master-g76a88a4307+1,master-g7bce1f4e06+57,master-g8ff4092549+31,master-g98e65bf68e,master-ga6b77976b1+53,master-gae20e2b580+3,master-gb584cd3397+53,master-gc5448b162b+1,master-gc54cf9771d,master-gc69578ece6+1,master-gcbf758c456+22,master-gcec1da163f+63,master-gcf15f11bcc,master-gd167108223,master-gf44c96c709
LSSTDataManagementBasePackage
|
Receive events from the event bus. More...
#include <EventReceiver.h>
Public Member Functions | |
| EventReceiver (const pexPolicy::Policy &policy) | |
| Receives events based on Policy file contents. More... | |
| EventReceiver (const std::string &hostName, const std::string &topicName, int hostPort=EventBroker::DEFAULTHOSTPORT) | |
| Receives events from the specified host and topic. More... | |
| EventReceiver (const std::string &hostName, const std::string &topicName, const std::string &selector, int hostPort=EventBroker::DEFAULTHOSTPORT) | |
| Receives events from the specified host and topic. More... | |
| virtual | ~EventReceiver () |
| destructor method More... | |
| Event * | receiveEvent () |
| wait until an event is received. More... | |
| Event * | receiveEvent (long timeout) |
| wait for a length of time for an event to be received. More... | |
| std::string | getTopicName () |
| returns the topic for this EventReceiver More... | |
Static Public Attributes | |
| static const long | infiniteTimeout = -1 |
Private Member Functions | |
| void | init (const std::string &hostName, const std::string &topicName, const std::string &selector, int hostPort) |
Private Attributes | |
| cms::Connection * | _connection |
| cms::Session * | _session |
| cms::Destination * | _destination |
| cms::MessageConsumer * | _consumer |
| bool | _turnEventsOff |
| std::string | _topic |
| std::string | _selector |
Receive events from the event bus.
Definition at line 63 of file EventReceiver.h.
| lsst.ctrl.events::EventReceiver::EventReceiver | ( | const pexPolicy::Policy & | policy | ) |
Receives events based on Policy file contents.
| policy | the policy object to use when building the receiver |
| throws | lsst::pex::exceptions::NotFoundError if topicName isn't specified |
| throws | lsst::pex::exceptions::NotFoundError if hostName isn't specified |
| throws | lsst::pex::exceptions::RuntimeError if connection fails to initialize |
Definition at line 73 of file EventReceiver.cc.
| lsst.ctrl.events::EventReceiver::EventReceiver | ( | const std::string & | hostName, |
| const std::string & | topicName, | ||
| int | hostPort = EventBroker::DEFAULTHOSTPORT |
||
| ) |
Receives events from the specified host and topic.
| hostName | the machine hosting the message broker |
| topicName | the topic to receive events from |
| hostPort | the port the message broker is listening on |
| throws | lsst::pex::exceptions::RuntimeError if connection fails to initialize |
Definition at line 123 of file EventReceiver.cc.
| lsst.ctrl.events::EventReceiver::EventReceiver | ( | const std::string & | hostName, |
| const std::string & | topicName, | ||
| const std::string & | selector, | ||
| int | hostPort = EventBroker::DEFAULTHOSTPORT |
||
| ) |
Receives events from the specified host and topic.
| hostName | the machine hosting the message broker |
| topicName | the topic to receive events from |
| selector | the message selector expression to use. A selector value of "" is equivalent to no selector. |
| hostPort | the port the message broker is listening on |
| throws | lsst::pex::exceptions::RuntimeError if connection fails to initialize |
Definition at line 136 of file EventReceiver.cc.
|
virtual |
destructor method
Definition at line 241 of file EventReceiver.cc.
| std::string lsst.ctrl.events::EventReceiver::getTopicName | ( | ) |
|
private |
private method for initialization of EventReceiver. Sets up use of local sockets or activemq, depending on how the policy file was configured.
Definition at line 144 of file EventReceiver.cc.
| Event * lsst.ctrl.events::EventReceiver::receiveEvent | ( | ) |
wait until an event is received.
Wait until an Event is received Note: Caller is responsible for deleting received Event.
Definition at line 199 of file EventReceiver.cc.
| Event * lsst.ctrl.events::EventReceiver::receiveEvent | ( | long | timeout | ) |
wait for a length of time for an event to be received.
Wait to receive an event for a length of time. Note: Caller is responsible for deleting received Event.
| timeout | the length of time to waitm in milliseconds |
Definition at line 208 of file EventReceiver.cc.
|
private |
Definition at line 85 of file EventReceiver.h.
|
private |
Definition at line 94 of file EventReceiver.h.
|
private |
Definition at line 91 of file EventReceiver.h.
|
private |
Definition at line 103 of file EventReceiver.h.
|
private |
Definition at line 88 of file EventReceiver.h.
|
private |
Definition at line 100 of file EventReceiver.h.
|
private |
Definition at line 97 of file EventReceiver.h.
|
static |
Definition at line 79 of file EventReceiver.h.
1.8.5