Public Member Functions | |
Helper (ContainerServicesBase services) throws AcsJException | |
ContainerServicesBase | getContainerServices () |
NamingContext | getNamingService () |
ChannelProperties | getChannelProperties () |
String | getNotificationFactoryNameForChannel (String channelName) |
String | getNotificationFactoryNameForChannel (String channelName, String domainName) |
Protected Member Functions | |
NamingContext | getNamingServiceInitial () throws AcsJException |
EventChannel | getNotificationChannel (String channelName, String channelKind, String notifyFactoryName) throws AcsJException |
EventChannel | createNotificationChannel (String channelName, String channelKind, String notifyFactoryName) throws AcsJException, NameAlreadyUsed, NameMapError |
EventChannel | createNotifyChannel_internal (EventChannelFactory notifyFactory, Property[] initial_qos, Property[] initial_admin, String channelName, IntHolder channelIdHolder) throws UnsupportedAdmin, NameAlreadyUsed, UnsupportedQoS, NameMapError |
void | destroyNotificationChannel (String channelName, String channelKind, EventChannel channelRef) throws AcsJException |
Protected Attributes | |
final Logger | m_logger |
Private Attributes | |
final NamingContext | m_nContext |
final ContainerServicesBase | m_services |
final ChannelProperties | m_channelProperties |
final CDBAccess | m_cdbAccess |
DAOProxy | channelsDAO |
final Map< String, Long > | channelConfigProblems = new HashMap<String Long>() |
Static Private Attributes | |
final String | m_nameJavaProp = "ORBInitRef.NameService" |
|
Creates a new instance of Helper, which includes resolving the naming service.
|
|
Tries to create a notification channel (using quality of service and administrative properties specified by configQofS() and configAdminProps() respectively). If this succeeds, then registers this channel with the naming service.
Should only be invoked when the channel that this supplier or consumer is attempting to connect to does not exist. However even with prior check for the existence of this channel, a race condition with other suppliers or consumers can lead to multiple attempts to create the same channel, which will result in Design note: Currently the TAO notification extensions are used to synch channel creation with other clients by supplying the channel name to the factory. If we want to use only standard NC factories then we'd have to implement our own locking mechanisms in all ACS consumer and supplier classes, see http://jira.alma.cl/browse/COMP-2808
|
|
Broken out from createNotificationChannel(String, String, String) to give tests better control about the timing when this call to the event factory is made. Reimplemented in alma::acs::nc::HelperTest::HelperWithChannelCreationSynch.
|
|
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!!! Use this method with extreme caution as it's likely to become deprecated in future versions of ACS!
|
|
Provides access to the information about the channel contained within the ACS CDB
|
|
Returns a reference to the Container Services which are provided by a container or client.
|
|
Returns a reference to the Naming Service.
|
|
Retrieves and returns a reference to the Naming Service. This code belongs to the constructor and should only be called from there.
This method is : The dependence of NC libs on the NamingService should be expressed in a less hidden form than using a property, which leads to dangerous runtime-only failures if missing. It would already be an improvement if we would obtain the NamingService reference from AdvancedContainerServices#getORB(). A more radical change would be to integrate the NC classes into the ContainerServices.
|
|
This method gets a reference to the event channel. If it is not already registered with the naming service, it is created.
|
|
Gets the notification channel factory name for the given channel/domain.
Tries to use the optional mapping from the CDB, otherwise uses
|
|
Get notification channel factory name for given channel.
|
|
Map that's used similar to a log repeat guard, because the OMC was flooded with NC config problem logs (as of 2008-03-06). key = channel name; value = timestamp in ms when config error was found for the given channel. |
|
|
|
|
|
|
|
|
|
Java property name for the CORBA Naming Service corbaloc. This property is set in the acsstartup :: acsStartJava. : Check if we can eliminate this property if we use something similar as in jmanager's com.cosylab.acs.maci.plug.NamingServiceRemoteDirectory. |
|
In a running system, there can be only one reference to the Naming Service. remove nulling this ref in ./ACSLaser/baciPropsTest/test/alma/acs/alarmsystem/test/BACITest.java: Helper.m_nContext = null; ./ACSLaser/laser-source/test/alma/lasersource/test/SendTest.java: Helper.m_nContext = null; ./ACSLaser/laser-source/test/alma/lasersource/test/SourceStressTest.java: Helper.m_nContext = null; |
|
|