#include <acsncArchiveConsumer.h>
Classes | |
class | ArchiveHandler |
Public Types | |
typedef Loki::SmartPtr < ArchiveHandler, Logging::RefCounted, Loki::AllowConversion, Loki::NoCheck, Loki::DefaultSPStorage > | ArchiveHandlerSmartPtr |
Archive handler smart pointer. | |
Public Member Functions | |
ArchiveConsumer (ArchiveHandlerSmartPtr handler) | |
ArchiveConsumer (CORBA::ORB_ptr orb_p, ArchiveHandlerSmartPtr handler) | |
ArchiveConsumer (int argc, char *argv[], ArchiveHandlerSmartPtr handler) | |
virtual void | push_structured_event (const CosNotification::StructuredEvent &publishedEvent) |
Protected Member Functions | |
const char * | getChannelKind () |
const char * | getChannelDomain () |
const char * | getNotificationFactoryName () |
Private Member Functions | |
void | subscribeAllEvents () |
Private Attributes | |
ArchiveHandlerSmartPtr | handler_m |
typedef Loki::SmartPtr<ArchiveHandler, Logging::RefCounted, Loki::AllowConversion, Loki::NoCheck, Loki::DefaultSPStorage> nc::ArchiveConsumer::ArchiveHandlerSmartPtr |
Archive handler smart pointer.
nc::ArchiveConsumer::ArchiveConsumer | ( | ArchiveHandlerSmartPtr | handler | ) |
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).
handler | A (static) method which will be invoked each time an archive event is received. |
nc::ArchiveConsumer::ArchiveConsumer | ( | CORBA::ORB_ptr | orb_p, | |
ArchiveHandlerSmartPtr | handler | |||
) |
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.
orb_mp | ORB that has a valid reference to the Naming Service. | |
handler | A (static) method which will be invoked each time an archive event is received. |
nc::ArchiveConsumer::ArchiveConsumer | ( | int | argc, | |
char * | argv[], | |||
ArchiveHandlerSmartPtr | handler | |||
) |
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.
argc | Number of ORB parameters in argv or 0 | |
argv | ORB params. Typically something like: orbArg[0] = "" . orbArg[1] = "-ORBInitRef NameService=corbaloc::host:xxxx/NameService" orbArg[2] = "-ORBDottedDecimalAddresses=1" | |
handler | A (static) method which will be invoked each time an archive event is received.
Sample Usage:
|
const char* nc::ArchiveConsumer::getChannelDomain | ( | ) | [protected, virtual] |
const char* nc::ArchiveConsumer::getChannelKind | ( | ) | [protected, virtual] |
const char* nc::ArchiveConsumer::getNotificationFactoryName | ( | ) | [inline, protected, virtual] |
This method returns a constant character pointer to the name of the notification service as registered with the CORBA Naming Service.
Reimplemented from nc::Helper.
virtual void nc::ArchiveConsumer::push_structured_event | ( | const CosNotification::StructuredEvent & | publishedEvent | ) | [virtual] |
Overridden
publishedEvent | The real CORBA event (defined via an IDL definition). This structure has little to do with so-called ICD events. |
CosEventComm::Disconnected |
Implements nc::Consumer.
void nc::ArchiveConsumer::subscribeAllEvents | ( | ) | [private] |
Method used to subscribe to all types of events on the channel.
ACSErrTypeCommon::CORBAProblemEx |
|
This function does something with archive events.