|
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
|
Transmit events to the event bus. More...
#include <EventTransmitter.h>
Public Member Functions | |
| EventTransmitter (const pexPolicy::Policy &policy) | |
| Configures an EventTransmitter based on Policy contents. More... | |
| EventTransmitter (const std::string &hostName, const std::string &topicName, int hostPort=EventBroker::DEFAULTHOSTPORT) | |
| Transmits events to the specified host and topic. More... | |
| ~EventTransmitter () | |
| Destructor for EventTransmitter. More... | |
| std::string | getTopicName () |
| get the topic name of this EventTransmitter More... | |
| void | publishEvent (Event &event) |
Private Member Functions | |
| void | init (const std::string &hostName, const std::string &topicName, int port) |
Private Attributes | |
| cms::Connection * | _connection |
| cms::Session * | _session |
| cms::Destination * | _destination |
| cms::MessageProducer * | _producer |
| std::string | _brokerUri |
| activemq::commands::ActiveMQTopic * | _topic |
| std::string | _topicName |
| bool | _turnEventsOff |
Transmit events to the event bus.
Definition at line 67 of file EventTransmitter.h.
| lsst.ctrl.events::EventTransmitter::EventTransmitter | ( | const pexPolicy::Policy & | policy | ) |
Configures an EventTransmitter based on Policy contents.
The Policy object is checked for four keywords:
topicName - the name of the topic to send to hostName - the name of the host hosting the event broker hostPort - the port the event broker is listening on turnEventsOff - turn off event transmission
Defaults are:
turnEventsOff = false hostPort = EventSystem::DEFAULTHOSTPORT
The dependencies for these keywords are as follows:
1) If turnEventsOff is specified as true, no further checking is done, and no events will be transmitted.
2) If no topicName is specified, a NotFound exception is thrown
| policy | the policy object to use when building the receiver |
| throws | NotFoundError if expected keywords are missing in Policy object |
| throws | RuntimeError if connection to transport mechanism fails |
Definition at line 94 of file EventTransmitter.cc.
| lsst.ctrl.events::EventTransmitter::EventTransmitter | ( | const std::string & | hostName, |
| const std::string & | topicName, | ||
| int | hostPort = EventBroker::DEFAULTHOSTPORT |
||
| ) |
Transmits events to the specified host and topic.
| hostName | the machine hosting the message broker |
| topicName | the topic to transmit events to |
| hostPort | the port number which the message broker is listening to |
| throws | RuntimeError if local socket can't be created |
| throws | RuntimeError if connect to local socket fails |
| throws | RuntimeError if connect to remote ActiveMQ host fails |
Definition at line 136 of file EventTransmitter.cc.
| lsst.ctrl.events::EventTransmitter::~EventTransmitter | ( | ) |
Destructor for EventTransmitter.
Definition at line 226 of file EventTransmitter.cc.
| std::string lsst.ctrl.events::EventTransmitter::getTopicName | ( | ) |
get the topic name of this EventTransmitter
Definition at line 220 of file EventTransmitter.cc.
|
private |
private initialization method for configuring EventTransmitter
Definition at line 145 of file EventTransmitter.cc.
| void lsst.ctrl.events::EventTransmitter::publishEvent | ( | Event & | event | ) |
Definition at line 202 of file EventTransmitter.cc.
|
private |
Definition at line 95 of file EventTransmitter.h.
|
private |
Definition at line 83 of file EventTransmitter.h.
|
private |
Definition at line 89 of file EventTransmitter.h.
|
private |
Definition at line 92 of file EventTransmitter.h.
|
private |
Definition at line 86 of file EventTransmitter.h.
|
private |
Definition at line 97 of file EventTransmitter.h.
|
private |
Definition at line 98 of file EventTransmitter.h.
|
private |
Definition at line 101 of file EventTransmitter.h.
1.8.5