#include <acsncConsumer.h>
Inheritance diagram for nc::Consumer:
Public Member Functions | |
Consumer (const char *channelName) | |
Consumer (const char *channelName, CORBA::ORB_ptr orb_mp) | |
Consumer (const char *channelName, int argc, char *argv[]) | |
virtual void | disconnect () |
virtual void | push_structured_event (const CosNotification::StructuredEvent &publishedEvent)=0 |
virtual void | offer_change (const CosNotification::EventTypeSeq &added, const CosNotification::EventTypeSeq &removed) |
virtual void | disconnect_structured_push_consumer () |
void | consumerReady () |
void | resume () |
void | suspend () |
template<class T> void | addSubscription () |
template<class T> void | removeSubscription () |
int | addFilter (const char *type_name, const char *filter) |
bool | removeFilter (int filter_id) |
Protected Member Functions | |
void | init () |
virtual | ~Consumer () |
void | createConsumer () |
virtual const char * | getFilterLanguage () |
Protected Attributes | |
CosNotifyChannelAdmin::ConsumerAdmin_var | consumerAdmin_m |
CosNotifyChannelAdmin::StructuredProxyPushSupplier_var | proxySupplier_m |
unsigned long long | numEvents_m |
CosNotifyComm::StructuredPushConsumer_var | reference_m |
CDBProperties::EventHandlerTimeoutMap | handlerTimeoutMap_m |
Profiler * | profiler_mp |
Static Protected Attributes | |
double | DEFAULT_MAX_PROCESS_TIME |
Private Member Functions | |
void | init (CORBA::ORB_ptr orb) |
void | operator= (const Consumer &) |
Consumer (const Consumer &) | |
void | addSubscription (const char *type_name) |
void | removeSubscription (const char *type_name) |
Private Attributes | |
CORBA::ORB_ptr | orb_mp |
TODO:
|
Constructor to be used within components. Consumer will use the Container to get a reference to the Naming Service. If a valid reference to the container cannot be obtained, Consumer will default to creating it's own ORB (assuming Consumer is run on the same host as the Naming Service).
|
|
Constructor to be used within SimpleClient's. This constructor is provided for API users who create their own ORB that has a reference to the Naming Service.
|
|
Optional constructor - used outside of ACS. This constructor is very resource intensive (it spawns it's own ORB) and should only to be utilized when there is a reason not to use Manager to get at the Naming Service. If argc==0, default parameters (i.e., environment variables) specify how to get to the Naming Service. Otherwise, it is assumed argv has a valid corbaloc to the Naming Service.
|
|
Destructor is protected. |
|
ALMA C++ coding standards state copy constructors should be disabled. |
|
Filter out events meeting certain requirements. Because ALMA has chosen to define ICD events solely in terms of IDL structs, this method has little use. For interested developers with free time on their hands, please see OMG's documentation on the Extended Trader Constraint language to see what filters look like used with simple CORBA types.
|
|
Subscribe to more events. In all likelehood this method will become private very soon.
|
|
Subscribe to more events. The template parameter T is the ALMA event type to subscribe to.
|
|
After this method is invoked, the developer has little control over when events are received (i.e., push_structured_event() is invoked).
|
|
Utility method. Creates a proxy supplier and consumer admin. Next connect this consumer to the proxy supplier.
|
|
Disconnect from the channel. Call this instead of deleting the object. Once disconnect has been invoked, developers should treat the object as if it has been deleted.
|
|
The Supplier calls this when it disconnects from the channel. Do not call it on your own!
|
|
This method returns a constant character pointer to the type of filter constraint language to be used for filtering events which is normally equivalent to acsnc::FILTER_LANGUAGE_NAME. Override to change this behavior.
|
|
Utility method. Initialization method where code common to all constructors is kept.
|
|
Utility method. Initialization method where code common to all constructors is kept. It shall be called explicitly in the constructors of the derived classes, since it is actually NOT called in the constructors of this pure virtual class.
|
|
Supplier calls this when it has events to add or remove from the notification channel. Note that this method contains only a bare-bones implementation.Do not call it on your own!
|
|
ALMA C++ coding standards state assignment operators should be disabled. |
|
This pure virtual function must be overridden by the child class to receive data from the channel. Do not call it on your own!
Implemented in nc::ArchiveConsumer, and nc::SimpleConsumer< T >.
|
|
Remove a filter. See comments on the addFilter() method.
|
|
Unsubscribe from events.
|
|
Unsubscribe from events. The template parameter T is the type of structured events to unsubscribe from.
|
|
A suspended (see suspend()) connection can be resumed. All events queued during suspend will be forward to the Consumer!
|
|
After this method is invoked, the connection is suspended. All events published on this channel will not be processed by this Consumer instance, but they will be queued by the Supplier. After resuming the connection all queued events will be forwarded to the Consumer!
|
|
The consumer admin object used by consumers to get a reference to the structured supplier proxy. |
|
Default maximum amount of time an event handler is given to process event before an exception is logged. this is used when an enduser does *not* define the appropriate XML elements within the ACS CDB. see the inline doc on EventChannel.xsd for more info. Also, this value is in floating point seconds. |
|
Maps events to the total amount of time they have to be processed. |
|
The number of events received so far. It is up do the developer to update this variable. |
|
ORB used by this consumer. |
|
Used to profile handler times. |
|
The proxy supplier that we are connected to. This invokes methods defined in IDL stub class such as push_structured_event(). |
|
Handle destruction using an _var reference to the underlying CORBA object. |