BaseHelper

NAME
SYNOPSIS
Detailed Description
Constructor & Destructor Documentation
Member Function Documentation
Member Data Documentation
Author

NAME

BaseHelper −

SYNOPSIS

#include <basencHelper.h>

Inherited by BaseSupplier.

Public Member Functions

std::string getCombinedChannelAndDomainName () const

Static Public Member Functions

static char * getNotificationFactoryNameForChannel (CDB::DAL_ptr dal, const char *channelName, const char *domainName=0)

static std::string combineChannelAndDomainName (const std::string &channelName, const std::string &domainName)

Protected Member Functions

BaseHelper (const char *channelName, const char *acsNCDomainName=0)

virtual void init (CosNaming::NamingContext_ptr nc_p)

virtual void done ()

virtual ~BaseHelper ()

virtual void disconnect ()

virtual const char * getChannelKind ()

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 * acsNCDomainName_mp

char * notificationServiceName_mp

std::string channelAndDomainName_m

bool initCalled_m

Detailed Description

Baseclass for all NC objects. Provides common functionality such as access to the Notification Service and channel creation.

Constructor & Destructor Documentation

BaseHelper::BaseHelper (const char * channelName, const char * acsNCDomainName = 0) [protected] Standard constructor.

Parameters:

channelName Name of the channel
acsNCDomainName
Name of the ACS NC domain name

virtual BaseHelper::~BaseHelper () [protected, virtual] Destructor

Member Function Documentation

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.

static std::string BaseHelper::combineChannelAndDomainName (const std::string & channelName, const std::string & domainName) [static] This method will combine the channel and domain name and return a string similar to the following one: channel_name This is used to build the name of the channel as it should be registered in the 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!

Returns:

void

virtual void BaseHelper::disconnect () [protected, virtual] Disconnects from the channel. This method should be used instead of the destructor.

Reimplemented in BaseSupplier.

virtual void BaseHelper::done () [protected, virtual] Should clean up what was created in init() method

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.

Returns:

quality of service properties used to create a notification channel

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. Before ACS 12.1 (ICT-494), there were special cases (Archiving and Logging NCs) for which the event’s Corba-level ’domain’ could be overridden. We leave this method for the time being, although it is no longer expected to be overloaded.

virtual const char* BaseHelper::getChannelKind () [inline, protected, 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. Before ACS 12.1 (ICT-494), there were special cases (Archiving and Logging NCs) for which the ’kind’ could be overridden. We leave this method for the time being, although it is no longer expected to be overloaded.

Reimplemented in AlarmSupplier, and TestSupplier.

std::string BaseHelper::getCombinedChannelAndDomainName () const [inline] Returns Combined channel and domain name which looks like channel_name and which is used in the naming service to identify the channel

References channelAndDomainName_m.

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.

Returns:

pointer to a constant string. Normally acscommon::NOTIFICATION_FACTORY_NAME

Reimplemented in ArchiveSupplier.

References acsNCDomainName_mp, channelName_mp, getNotificationFactoryNameForChannel(), namingContext_m, and notificationServiceName_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.

Parameters:

channelName name of the channel.
domainName
name of the domain, 0 if undefined.

Returns:

notification channel factory name.

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.

Returns:

quality of service properties used to create a notification channel

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.

Parameters:

nc_p CORBA Naming Service pointer

Reimplemented in BaseSupplier.

Member Data Documentation

char* BaseHelper::acsNCDomainName_mp [protected] Name of the ACS NC domain.

Referenced by getNotificationFactoryName().

std::string BaseHelper::channelAndDomainName_m [protected] Channel and domain name like channel_name

Referenced by getCombinedChannelAndDomainName().

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 ’resolved’ 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.

Author

Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code.