Classes | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

nc::ArchiveConsumer Class Reference

#include <acsncArchiveConsumer.h>

Inheritance diagram for nc::ArchiveConsumer:
Inheritance graph
[legend]
Collaboration diagram for nc::ArchiveConsumer:
Collaboration graph
[legend]

List of all members.

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

Member Typedef Documentation

typedef Loki::SmartPtr<ArchiveHandler, Logging::RefCounted, Loki::AllowConversion, Loki::NoCheck, Loki::DefaultSPStorage> nc::ArchiveConsumer::ArchiveHandlerSmartPtr

Archive handler smart pointer.


Constructor & Destructor Documentation

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).

Parameters:
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.

Parameters:
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.

Parameters:
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:
  • Consumer("fridge",0,(char **)0); - Generates ORB arguments on the fly from environment variables.
  • Consumer("fridge",argc,argv); - Uses passed ORB arguments.

Member Function Documentation

const char* nc::ArchiveConsumer::getChannelDomain (  )  [protected, virtual]

Overridden

Returns:


Reimplemented from nc::Helper.

const char* nc::ArchiveConsumer::getChannelKind (  )  [protected, virtual]

Overridden

Returns:


Reimplemented from nc::Helper.

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.

Returns:
pointer to a constant string. Normally acscommon::NOTIFICATION_FACTORY_NAME

Reimplemented from nc::Helper.

virtual void nc::ArchiveConsumer::push_structured_event ( const CosNotification::StructuredEvent &  publishedEvent  )  [virtual]

Overridden

Parameters:
publishedEvent The real CORBA event (defined via an IDL definition). This structure has little to do with so-called ICD events.
Exceptions:
CosEventComm::Disconnected 
Returns:
void

Implements nc::Consumer.

void nc::ArchiveConsumer::subscribeAllEvents (  )  [private]

Method used to subscribe to all types of events on the channel.

Returns:
Exceptions:
ACSErrTypeCommon::CORBAProblemEx 


Member Data Documentation

This function does something with archive events.


The documentation for this class was generated from the following file: