Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

BaseSupplier Class Reference

#include <basencSupplier.h>

Inheritance diagram for BaseSupplier:
Inheritance graph
[legend]
Collaboration diagram for BaseSupplier:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BaseSupplier (const char *channelName, const char *acsNCDomainName=0)
virtual void disconnect ()
void init (CosNaming::NamingContext_ptr nc_p)
void done ()
virtual void subscription_change (const CosNotification::EventTypeSeq &added, const CosNotification::EventTypeSeq &removed)
virtual void disconnect_structured_push_supplier ()

Protected Member Functions

virtual ~BaseSupplier ()
void publishEvent (const CosNotification::StructuredEvent &event)
virtual void populateHeader (CosNotification::StructuredEvent &event)
virtual const char * getEventType ()=0
virtual const char * getEventName ()
virtual acsnc::OSPushSupplier_ptr getCORBARef ()

Private Member Functions

void connect ()

Private Attributes

CosNotifyChannelAdmin::SupplierAdmin_var supplierAdmin_m
CosNotifyChannelAdmin::StructuredProxyPushConsumer_var proxyConsumer_m
CosNotifyChannelAdmin::ProxyID proxyConsumerID_m
CosNotifyChannelAdmin::AdminID adminID_m
acsnc::OSPushSupplier_var corbaRef_m
Logging::RepeatGuardLogger
< Logging::BaseLog
guardbl_m

Detailed Description

Abstract baseclass designed to send structured events out.


Constructor & Destructor Documentation

BaseSupplier::BaseSupplier ( const char *  channelName,
const char *  acsNCDomainName = 0 
)

Standard constructor.

Parameters:
channelName Name of the channel to use.
acsNCDomainName Name of the ACS NC domain name. It will default to acscommon::NAMESERVICE_BINDING_NC_DOMAIN_DEFAULT if it is not specified.
virtual BaseSupplier::~BaseSupplier (  )  [protected, virtual]

Destructor


Member Function Documentation

void BaseSupplier::connect (  )  [private]

Connect the Supplier to the EventChannel.

Parameters:
supplier_admin A supplier admin object which we can connect this instance of BaseSupplier to.
virtual void BaseSupplier::disconnect (  )  [virtual]

Overridden.

Reimplemented from BaseHelper.

virtual void BaseSupplier::disconnect_structured_push_supplier (  )  [virtual]

CORBA method we do not really care about from this class other than the fact that it must be overridden.

void BaseSupplier::done (  )  [virtual]

Override. Clean up what was initalized/created in init method.

Reimplemented from BaseHelper.

virtual acsnc::OSPushSupplier_ptr BaseSupplier::getCORBARef (  )  [protected, virtual]

Utility method only used by Supplier and should not be called by your code directly. Provided just in case someone wants to create this object's underlying CORBA reference using other libraries/POAs/etc

Returns:
CORBA reference to ourself
virtual const char* BaseSupplier::getEventName (  )  [inline, protected, virtual]

This method returns a constant character pointer to the type of event.

Returns:
pointer to a constant string.
virtual const char* BaseSupplier::getEventType (  )  [protected, pure virtual]

This method returns a constant character pointer to the type of event.

Returns:
pointer to a constant string.

Implemented in AlarmSupplier, ArchiveSupplier, and TestSupplier.

void BaseSupplier::init ( CosNaming::NamingContext_ptr  nc_p  )  [virtual]

Overridden. This object will not function until this method has been invoked.

Reimplemented from BaseHelper.

virtual void BaseSupplier::populateHeader ( CosNotification::StructuredEvent &  event  )  [protected, virtual]

Developer's responsibility to call this method before sending any event.

Referenced by TestSupplier::publishEvent().

void BaseSupplier::publishEvent ( const CosNotification::StructuredEvent &  event  )  [protected]

Send an entire structured event. Subclasses should create their own structured event and then call this method to do the real publishing of events.

TODO: throw an exception to make the caller aware in case of error publishing the event (

See also:
JIRA:COMP-8454).
Parameters:
event A CORBA StructuredEvent
virtual void BaseSupplier::subscription_change ( const CosNotification::EventTypeSeq &  added,
const CosNotification::EventTypeSeq &  removed 
) [virtual]

CORBA method we do not really care about from this class other than the fact that it must be overridden.

Exceptions:
CosNotifyComm::InvalidEventType 

Member Data Documentation

CosNotifyChannelAdmin::AdminID BaseSupplier::adminID_m [private]

Supplier admin ID.

acsnc::OSPushSupplier_var BaseSupplier::corbaRef_m [private]

CORBA reference to myself.

The log produced in case of error publishing events in the NC must be guarded. (

See also:
JIRA:COMP-8454)
CosNotifyChannelAdmin::StructuredProxyPushConsumer_var BaseSupplier::proxyConsumer_m [private]

The proxy that we are connected to.

CosNotifyChannelAdmin::ProxyID BaseSupplier::proxyConsumerID_m [private]

This supplier's id.

CosNotifyChannelAdmin::SupplierAdmin_var BaseSupplier::supplierAdmin_m [private]

Supplier Admin object is responsible for creating & managing proxy consumers w/ a common set of QoS property settings & filter objects.


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