#include <basencHelper.h>
Static Public Member Functions | |
static char * | getNotificationFactoryNameForChannel (CDB::DAL_ptr dal, const char *channelName, const char *domainName=0) |
Protected Member Functions | |
BaseHelper (const char *channelName, const char *notifyServiceDomainName=0) | |
virtual void | init (CosNaming::NamingContext_ptr nc_p) |
virtual | ~BaseHelper () |
virtual void | disconnect () |
virtual const char * | getChannelKind ()=0 |
virtual const char * | getChannelDomain () |
virtual const char * | getNotificationFactoryName () |
virtual const CosNotification::QoSProperties | getQoSProps () |
virtual const CosNotification::AdminProperties | getAdminProps () |
virtual void | createNotificationChannel () |
virtual void | getNotifyService () |
virtual void | attachChannelToNS () |
virtual void | destroyNotificationChannel () |
Protected Attributes | |
CosNaming::NamingContext_var | namingContext_m |
CosNotifyChannelAdmin::EventChannelFactory_var | notifyFactory_m |
CosNotifyChannelAdmin::ChannelID | channelID_m |
CosNotifyChannelAdmin::InterFilterGroupOperator | ifgop_m |
CosNotifyChannelAdmin::EventChannel_var | notifyChannel_m |
char * | channelName_mp |
char * | notifyServiceDomainName_mp |
char * | notificationServiceName_mp |
bool | initCalled_m |
Baseclass for all NC objects. Provides common functionality such as access to the Notification Service and channel creation.
BaseHelper::BaseHelper | ( | const char * | channelName, | |
const char * | notifyServiceDomainName = 0 | |||
) | [protected] |
Standard constructor.
channelName | Name of the channel | |
notifyServiceDomainName | Name of the notification service domain name used to determine notification service. |
virtual BaseHelper::~BaseHelper | ( | ) | [protected, virtual] |
Destructor
virtual void BaseHelper::attachChannelToNS | ( | ) | [protected, virtual] |
Utility method only used by Supplier and should not be called by your code directly. Provided just in case someone wants to do something extra after adding a reference to the newly created channel within the CORBA Naming Service.
Adds a reference to the channel to the CORBA Naming Service.
virtual void BaseHelper::createNotificationChannel | ( | ) | [protected, virtual] |
Utility method only used by Supplier and should not be called by your code directly. Provided just in case someone wants to do something extra after creating a channel.
Creates notification channel.
virtual void BaseHelper::destroyNotificationChannel | ( | ) | [protected, virtual] |
Utility method. Destroys a notification channel. ONLY USE THIS METHOD IF YOU KNOW FOR CERTAIN THERE IS ONLY ONE SUPPLIER FOR THE CHANNEL!!! Use with extreme caution! This method will most likely become deprecated in future releases of ACS!
virtual void BaseHelper::disconnect | ( | ) | [protected, virtual] |
Disconnects from the channel. This method should be used instead of the destructor.
Reimplemented in BaseSupplier.
virtual const CosNotification::AdminProperties BaseHelper::getAdminProps | ( | ) | [protected, virtual] |
Utility method. Returns admin properties used to create a notification channel. Developers should override this method if the defaults are insufficient.
virtual const char* BaseHelper::getChannelDomain | ( | ) | [inline, protected, virtual] |
This method returns a constant character pointer to the domain of notification channel which is normally equivalent to acscommon::ALMADOMAIN. The sole reason this method is provided is to accomodate subclasses which subscribe/publish non-ICD style events (ACS archiving channel for example).In that case, the developer would override this method.
Reimplemented in ArchiveSupplier.
virtual const char* BaseHelper::getChannelKind | ( | ) | [protected, pure virtual] |
This method returns a constant character pointer to the "kind" of notification channel as registered with the naming service (i.e., the kind field of a CosNaming::Name) which is normally equivalent to acscommon::NC_KIND. The sole reason this method is provided is to accomodate subclasses which subscribe/publish non-ICD style events (ACS archiving channel for example).In that case, the developer would override this method.
Implemented in AlarmSupplier, ArchiveSupplier, and TestSupplier.
virtual const char* BaseHelper::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 in ArchiveSupplier.
References channelName_mp, getNotificationFactoryNameForChannel(), namingContext_m, notificationServiceName_mp, and notifyServiceDomainName_mp.
static char* BaseHelper::getNotificationFactoryNameForChannel | ( | CDB::DAL_ptr | dal, | |
const char * | channelName, | |||
const char * | domainName = 0 | |||
) | [static] |
Get notification channel factory name for given channel/domain.
channelName | name of the channel. | |
domainName | name of the domain, 0 if undefined. |
Referenced by getNotificationFactoryName(), and nc::Helper::getNotificationFactoryName().
virtual void BaseHelper::getNotifyService | ( | ) | [protected, virtual] |
Utility method only used by Supplier and should not be called by your code directly. Provided just in case someone wants to get at the notification service using something other than the CORBA Naming Service.
Gets a reference to the notification service and sets member values accordingly.
virtual const CosNotification::QoSProperties BaseHelper::getQoSProps | ( | ) | [protected, virtual] |
Utility method. Returns quality of service properties used to create a notification channel. Override this method if the defaults are insufficient.
virtual void BaseHelper::init | ( | CosNaming::NamingContext_ptr | nc_p | ) | [protected, virtual] |
Initialization method. In short, no method of this class can be successfully invoked until this method has been called.
nc_p | CORBA Naming Service pointer |
Reimplemented in BaseSupplier.
CosNotifyChannelAdmin::ChannelID BaseHelper::channelID_m [protected] |
Keep a reference to the channel. Should this be removed in future releases of ACS???
char* BaseHelper::channelName_mp [protected] |
Name of the channel.
Referenced by getNotificationFactoryName(), and ArchiveSupplier::sendEvent().
CosNotifyChannelAdmin::InterFilterGroupOperator BaseHelper::ifgop_m [protected] |
The group operator between admin-proxy's. The purpose of this variable is to define how multiple Filters are considered in a proxy admin. Basically this variable does not matter since filtering at the admin level is not allowed!
bool BaseHelper::initCalled_m [protected] |
Shows whether the init method has been called yet.
CosNaming::NamingContext_var BaseHelper::namingContext_m [protected] |
A naming context (i.e., Naming Service reference)
Referenced by getNotificationFactoryName().
char* BaseHelper::notificationServiceName_mp [protected] |
Name of "resovled" notification service.
Referenced by getNotificationFactoryName().
CosNotifyChannelAdmin::EventChannel_var BaseHelper::notifyChannel_m [protected] |
The notification channel used to send/receive events. This is created by the notification channel factory. This channel is bound to the naming service using channelName_mp.
CosNotifyChannelAdmin::EventChannelFactory_var BaseHelper::notifyFactory_m [protected] |
Channel factory. Used to create new channels.
char* BaseHelper::notifyServiceDomainName_mp [protected] |
Name of the nofitication service domain.
Referenced by getNotificationFactoryName().