A base class that accepts named events from a Push supplier.
More...
#include <carma/util/NotificationConsumer.h>
Inherits StructuredPushConsumer.
|
virtual PortableServer::POA_ptr | _default_POA () |
|
void | deactivateConsumer () |
| Method to deactivate an active consumer. More...
|
|
virtual void | disconnect_structured_push_consumer () throw (CORBA::SystemException) |
| Callback function that gets called by the notification server if it decides to disconnect the push consumer. More...
|
|
bool | isActive () |
| Method to test whether consumer is active. More...
|
|
| NotificationConsumer (Orb *localOrb, const std::string channelName, const std::string consumerName) |
| Constructor for Notification Consumer - creates ORB internally. More...
|
|
virtual void | offer_change (const CosNotification::EventTypeSeq &, const CosNotification::EventTypeSeq &) throw (CosNotifyComm::InvalidEventType, CORBA::SystemException) |
|
virtual void | push_structured_event (const CosNotification::StructuredEvent &event) throw (CosEventComm::Disconnected, CORBA::SystemException) |
| Callback function that is called by the notification server when notifications arrive for this consumer. More...
|
|
virtual void | run () |
| Blocking call that activates the callback for collecting events from the notification server. More...
|
|
|
const std::string | channelName_ |
|
const std::string | consumerName_ |
|
Orb * | localOrb_ |
|
std::string | localOrbName_ |
|
CORBA::ORB_var | orb_ |
|
PortableServer::POA_var | poa_ |
|
CosNotifyChannelAdmin::StructuredProxyPushSupplier_var | proxyPushSupplier_ |
|
A base class that accepts named events from a Push supplier.
This is the basis for event driven clients, with the push method being executed when the event is received. This class is usually extended and the push method is overridden. At the time of construction, this consumer object is bound to a notification channel, and an instance of a notification queue (through the consumerName).
Definition at line 24 of file NotificationConsumer.h.
carma::util::NotificationConsumer::NotificationConsumer |
( |
Orb * |
localOrb, |
|
|
const std::string |
channelName, |
|
|
const std::string |
consumerName |
|
) |
| |
Constructor for Notification Consumer - creates ORB internally.
- Parameters
-
orb | input pointer to orb |
channelName | name of channel for notifications |
consumerName | name of the consumer |
- Exceptions
-
carma::util::ErrorException | if resolved object is nil. |
CORBA::ORB::InvalidName | if NameService is not found |
CORBA::SystemException | for failed _narrow on NameService |
CosNaming::NamingContext::CannotProceed | |
CosNaming::NamingContext::InvalidName | if the CosNaming::Name created from hierarchicalName has an invalid element |
CORBA::ORB::InvalidName | if RootPOA is not found |
CORBA::SystemException | for failed _narrow on RootPOA |
PortableServer::POA::InvalidPolicy | if policyList contains an invalid policy |
PortableServer::POA::AdapterAlreadyExists | if POA with given poaString has already been craeted |
CORBA::Exception | cannot resolve ORB |
void carma::util::NotificationConsumer::deactivateConsumer |
( |
| ) |
|
Method to deactivate an active consumer.
Intended to be used in a multithreaded environment since run() is a blocking call.
virtual void carma::util::NotificationConsumer::disconnect_structured_push_consumer |
( |
| ) |
|
throw | ( | CORBA::SystemException |
| ) | | |
|
virtual |
Callback function that gets called by the notification server if it decides to disconnect the push consumer.
(DO NOT override this method!!!)
bool carma::util::NotificationConsumer::isActive |
( |
| ) |
|
Method to test whether consumer is active.
Intended to be used in a multithreaded environment since run() is a blocking call.
virtual void carma::util::NotificationConsumer::push_structured_event |
( |
const CosNotification::StructuredEvent & |
event | ) |
|
throw | ( | CosEventComm::Disconnected, |
| | CORBA::SystemException |
| ) | | |
|
virtual |
Callback function that is called by the notification server when notifications arrive for this consumer.
virtual void carma::util::NotificationConsumer::run |
( |
| ) |
|
|
virtual |
Blocking call that activates the callback for collecting events from the notification server.
- Exceptions
-
CARMA_ERROR | |
PortableServer::POAManager::AdapterInactive | |
void carma::util::NotificationConsumer::setProxyPushSupplier |
( |
| ) |
|
|
protected |
create a proxy push supplier for our push consumer
- Exceptions
-
carma::util::ErrorException | if resolved object is nil. |
CORBA::ORB::InvalidName | if NameService is not found |
CORBA::SystemException | for failed _narrow on NameService |
CosNaming::NamingContext::CannotProceed | |
CosNaming::NamingContext::InvalidName | if the CosNaming::Name created from hierarchicalName has an invalid element |
The documentation for this class was generated from the following file: