alma::acs::nc::ChannelProperties Class Reference

Collaboration diagram for alma::acs::nc::ChannelProperties:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ChannelProperties (ContainerServicesBase services)
boolean cdbChannelConfigExists (String channelName)
boolean isTraceEventsEnabled (String channelName) throws AcsJException
Property[] getCDBAdminProps (String channelName) throws AcsJException
Property[] getCDBQoSProps (String channelName) throws alma.acs.exceptions.AcsJException

Protected Member Functions

Property[] configQofS (String channelName) throws AcsJException
Property[] configAdminProps (String channelName) throws AcsJException

Private Attributes

final ContainerServicesBase m_services
final Logger m_logger

Detailed Description

ChanncelProperties is a class designed to retrieve the various quality of service and administrative properties for a given channel. It is intended to be used primarily by the Helper class within this package. *

think about joining this class with ChannelInfo.

Author:
dfugate

Constructor & Destructor Documentation

alma::acs::nc::ChannelProperties::ChannelProperties ( ContainerServicesBase  services  )  [inline]

Creates a new instance of ChannelProperties.

Parameters:
services A reference to the ContainerServices. Used to retrieve other CORBA references and to access the logger.

References alma::acs::container::ContainerServicesBase::getLogger(), m_logger, and m_services.


Member Function Documentation

boolean alma::acs::nc::ChannelProperties::cdbChannelConfigExists ( String  channelName  )  [inline]

Simple function which returns true if the given channel has an entry in $ACS_CDB/CDB/MACI/EventChannels/ section of the ACS configuration database.

Parameters:
channelName is a string referring to the name of a Notification Channel registered in the CORBA Naming Service
Returns:
true if $ACS_CDB/CDB/MACI/EventChannels/channel_name/channel_name.xml exists and is a valid XML. false otherwise.

References alma::acs::container::ContainerServicesBase::getCDB(), m_logger, and m_services.

Referenced by configAdminProps(), configQofS(), and isTraceEventsEnabled().

Property [] alma::acs::nc::ChannelProperties::configAdminProps ( String  channelName  )  throws AcsJException [inline, protected]

Override this method in a subclass to specify your own administrative properties for the channel. Only useful if the channel has not already been registered with the naming service.

Parameters:
channelName Name of the channel we are looking for
Returns:
A property array consisting of the administrative specifications.
Exceptions:
AcsJException Thrown if a CORBA Any cannot be created.

References cdbChannelConfigExists(), getCDBAdminProps(), and m_logger.

Referenced by alma::acs::nc::Helper::createNotificationChannel().

Property [] alma::acs::nc::ChannelProperties::configQofS ( String  channelName  )  throws AcsJException [inline, protected]

Override this method in a subclass to specify your own quality of service properties for the channel. Only useful if the channel has not already been registered with the naming service.

Parameters:
channelName Name of the channel we are looking for.
Returns:
A property array consisting of the quality of service specifications.
Exceptions:
AcsJException Thrown if a CORBA Any cannot be created.

References cdbChannelConfigExists(), getCDBQoSProps(), and m_logger.

Referenced by alma::acs::nc::Helper::createNotificationChannel().

Property [] alma::acs::nc::ChannelProperties::getCDBAdminProps ( String  channelName  )  throws AcsJException [inline]

Given a channel name that exists in the ACS CDB ($ACS_CDB/CDB/MACI/Channels/channelName/channelName.xml), this function returns the channels administrative properties in their CORBA format.

Parameters:
channelName name of the channel found in $ACS_CDB/CDB/MACI/Channels
Returns:
channel's admin properties
Exceptions:
AcsJException if the channel's CDB entry is corrupted in any way

References com::cosylab::CDB::DAOOperations::get_long(), com::cosylab::CDB::DAOOperations::get_string(), alma::acs::container::ContainerServicesBase::getAdvancedContainerServices(), alma::acs::container::AdvancedContainerServices::getAny(), alma::acs::container::ContainerServicesBase::getCDB(), m_logger, and m_services.

Referenced by configAdminProps().

Property [] alma::acs::nc::ChannelProperties::getCDBQoSProps ( String  channelName  )  throws alma.acs.exceptions.AcsJException [inline]

Given a channel name that exists in the ACS CDB ($ACS_CDB/CDB/MACI/Channels/channelName/channelName.xml), this function returns the channel's quality of service properties in their CORBA format.

The schema for this channel configuration is urn:schemas-cosylab-com:EventChannel:1.0.

Parameters:
channelName name of the channel found in $ACS_CDB/CDB/MACI/Channels
Returns:
channel's quality of service properties
Exceptions:
AcsJException if the channel's CDB entry is corrupted in any way

References com::cosylab::CDB::DAOOperations::get_long(), com::cosylab::CDB::DAOOperations::get_string(), alma::acs::container::ContainerServicesBase::getAdvancedContainerServices(), alma::acs::container::AdvancedContainerServices::getAny(), alma::acs::container::ContainerServicesBase::getCDB(), m_logger, and m_services.

Referenced by configQofS().

boolean alma::acs::nc::ChannelProperties::isTraceEventsEnabled ( String  channelName  )  throws AcsJException [inline]

When some attribute is set within the CDB (currently IntegrationLogs defined in EventChannel.xsd, see NC document), a log is published each time an event is sent or received. For performance reasons, this should be used very carefully to say the least.

Parameters:
channelName Name of the channel.
Returns:
True if event publishing/receiving should be traced by log messages.
Exceptions:
AcsJException 
Since:
ACS 6.0.1 (formerly called "getIntegrationLogs")

References cdbChannelConfigExists(), com::cosylab::CDB::DAOOperations::get_string(), alma::acs::container::ContainerServicesBase::getCDB(), m_logger, and m_services.

Referenced by alma::acs::nc::Consumer::Consumer(), alma::acs::nc::refactored::NCPublisher::NCPublisher(), and alma::acs::nc::SimpleSupplier::SimpleSupplier().


Member Data Documentation

Access to the component's name along with the logging service.

Referenced by cdbChannelConfigExists(), ChannelProperties(), getCDBAdminProps(), getCDBQoSProps(), and isTraceEventsEnabled().


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

Generated by  doxygen 1.6.2