Acspy.Nc.CommonNC
index
/alma/ACS-2016.6/ACSSW/lib/python/site-packages/Acspy/Nc/CommonNC.py

Provides functionality common to both NC suppliers and consumers.

 
Modules
       
CosNotifyChannelAdmin
Acspy.Util.NameTree
NotifyMonitoringExt
acscommon
datetime
time

 
Classes
       
__builtin__.object
CommonNC

 
class CommonNC(__builtin__.object)
    Serves as a baseclass for notification channel objects.
 
The notification channel is registered in the NamingService
with the name: channelName+ NAMESERVICE_BINDING_NC_DOMAIN_SEPARATOR+domainName (see COMP-9338 for 
further details).
If the domain name is not provided then the fault is used: NAMESERVICE_BINDING_NC_DOMAIN_DEFAULT
 
  Methods defined here:
__init__(self, channelname, component, domainname=None)
Constructor.
 
Params:
- channelName is the channel name
- component is the component this object resides within
- domainName is the domain the channel belongs to
 
Returns: Nothing
 
Raises: Nothing.
combineChannelAndDomainName(self)
#------------------------------------------------------------------------------
configAdminProps(self)
Configures the administrative properties for this channel.
 
Only useful if the channel has not been created yet and this particular
method is being overriden.
 
Parameters: None
 
Returns: A sequence of Administrative properties.
 
Raises: Nothing
configQofS(self)
Configures the quality of service properties for this channel.
 
Only useful if the channel has not been created yet and this particular
method is being overriden.
 
Parameters: None
 
Returns: A sequence of Quality of Service properties.
 
Raises: Nothing
createNotificationChannel(self)
Creates the notification channel.  Only to be called if it does not already
exist.
 
Parameters: None
 
Returns: Nothing
 
Raises: ACSErrTypeCommonImpl.CORBAProblemExImpl on critical failures
destroyNotificationChannel(self)
Destroys the channel and unregisters it from the naming service. ONLY 
USE THIS METHOD IF YOU KNOW FOR CERTAIN THERE IS ONLY ONE SUPPLIER FOR 
THE CHANNEL!!!  To be used with extreme caution. Likely to be removed with
future versions of ACS.
 
Parameters: None
 
Returns: 1 on success and 0 on failure
 
Raises: Nothing
getChannelDomain(self)
This method returns a constant character pointer to the notification channel
domain 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.
 
Parameters: None
 
Returns: a constant string.
 
Raises: Nothing
getChannelKind(self)
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.
 
Parameters: None
 
Returns:a constant string.
 
Raises: Nothing
getChannelTimestamp(self)
getChannelTimestampKind(self)
Naming context Kind value used to bind the channel with its creation time
Parameters: None
 
Returns:a constant string.
 
Raises: Nothing
getNotificationFactoryName(self)
This method returns the name of the notification service as registered
with the CORBA Naming Service.
 
Parameters: None
 
Returns: pointer to a constant string. Normally
acscommon::NOTIFICATION_FACTORY_NAME
 
Raises: Nothing
getNotificationFactoryNameForChannel(self, channel, domain=None)
This method returns the name of the notification service for the channel
or domain from the configuration information given in the CDB.
 
Parameters:
- channel is the channel name of the desired factory
- domain is the domain of the desired factory
 
Returns: string containing the factory name or None
 
Raises: Nothing
iniChannelTimestamp(self)
initCORBA(self)
Handles all the CORBA involved in creating a CommonNC.
 
Parameters: None
 
Returns: Nothing
 
Raises: ACSErrTypeCommonImpl.CORBAProblemExImpl on critical failures
setChannelTimestamp(self)
set_autoreconnect(self, autoreconnect)
Set autoreconnection on/off in case the Notify Service restarted.
 
Params: Nothing
 
Returns: Nothing
 
Raises: Nothing

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        NAMESERVICE_BINDING_NC_DOMAIN_DEFAULT = 'DEFAULTDOMAIN'
NAMESERVICE_BINDING_NC_DOMAIN_SEPARATOR = '@'
NC_KIND_NCSUPPORT = 'NCSupport'
__revision__ = '$Id: CommonNC.py,v 1.10 2012/01/25 16:45:33 acaproni Exp $'