org.openorb.notify.impl

Class EventChannelFactoryImpl

public class EventChannelFactoryImpl extends EventChannelFactoryPOA implements ChannelFactoryManagement

The EventChannelFactory interface defines operations for creating and managing new Notification Service style event channels. It supports a routine that creates new instances of Notification Service event channels and assigns unique numeric identifiers to them. In addition, the EventChannelFactory interface supports a routine which can return the unique identifiers assigned to all event channels created by a given instance of EventChannelFactory, and another routine which, given the unique identifier of an event channel created by a target EventChannelFactory instance, returns the object reference of that event channel.

Author: Olivier Modica

Field Summary
static intMAX_PERFORMANCE_POLICY
Defines a policy to max performance
static intMAX_RESOURCE_POLICY
Defines a policy to max resource
Constructor Summary
EventChannelFactoryImpl(ORB orb, POA poa, PropertiesRepository propertiesRepository, Logger logger)
Default constructor.
Method Summary
voidchannelDestroyed(int id)
This method is invoked when an EventChannel was destroyed.
voidchannelRecovered(int id, EventChannelImpl channel)
This method is invoked when an EventChannel was destroyed.
EventChannelcreate_channel(Property[] initial_qos, Property[] initial_admin, IntHolder id)
The create_channel operation is invoked to create a new instance of the Notification Service style event channel.
FilterFactoryImplgetFilterFactory()
This method returns the filter factory
POAgetPOA()
ObjectgetProperty(String key)
Method invoked to get the value of a property defined in the notification module
int[]get_all_channels()
The get_all_channels operation returns a sequence of all of the unique numeric identifiers corresponding to Notification Service event channels which have been created by the target object.
EventChannelget_event_channel(int id)
The get_event_channel operation accepts as input a numeric value which is supposed to be the unique identifier of a Notification Service event channel that has been created by the target object.
booleanisConsumerAdminMaxPerformance()
The methods returns true if the consumer admin threads should be configured as MaxPerformance
booleanisConsumerProxyMaxPerformance()
The methods returns true if the supplier proxy threads should be configured as MaxPerformance
booleanisQueueMaxPerformance()
The methods returns true if the event queue should be configured as MaxPerformance
booleanisSupplierAdminMaxPerformance()
The methods returns true if the supplier admin threads should be configured as MaxPerformance
booleanisSupplierProxyMaxPerformance()
The methods returns true if the consumer proxy threads should be configured as MaxPerformance
voidrecoveryFinished()
This method is invoked when all the EventChannels were recovered.

Field Detail

MAX_PERFORMANCE_POLICY

public static final int MAX_PERFORMANCE_POLICY
Defines a policy to max performance

MAX_RESOURCE_POLICY

public static final int MAX_RESOURCE_POLICY
Defines a policy to max resource

Constructor Detail

EventChannelFactoryImpl

public EventChannelFactoryImpl(ORB orb, POA poa, PropertiesRepository propertiesRepository, Logger logger)
Default constructor.

Method Detail

channelDestroyed

public void channelDestroyed(int id)
This method is invoked when an EventChannel was destroyed.

channelRecovered

public void channelRecovered(int id, EventChannelImpl channel)
This method is invoked when an EventChannel was destroyed.

create_channel

public EventChannel create_channel(Property[] initial_qos, Property[] initial_admin, IntHolder id)
The create_channel operation is invoked to create a new instance of the Notification Service style event channel. This operation accepts two input parameters. The first input parameter is a list of name-value pairs which specify the initial QoS property settings for the new channel. The second input parameter is a list of name-value pairs which specify the initial administrative property settings for the new channel. If no implementation of the EventChannel interface exists that can support all of the requested QoS property settings, the UnsupportedQoS exception is raised. This exception contains as data a sequence of data structures, each of which identifies the name of a QoS property in the input list whose requested setting could not be satisfied, along with an error code and a range of settings for the property which could be satisfied. The meanings of the error codes which might be returned are described in Table 2-5. Likewise, if no implementation of the EventChannel interface exists that can support all of the requested administrative property settings, the UnsupportedAdmin exception is raised. This exception contains as data a sequence of data structures, each of which identifies the name of an administrative property in the input list whose requested setting could not be satisfied, along with an error code and a range of settings for the property which could be satisfied. The meanings of the error codes which might be returned are described in Table 2-5. If neither of these exceptions is raised, the create_channel operation will return a reference to a new Notification Service style event channel. In addition, the operation assigns to this new event channel a numeric identifier which is unique among all event channels created by the target object. This numeric identifier is returned as an output parameter.

getFilterFactory

public FilterFactoryImpl getFilterFactory()
This method returns the filter factory

getPOA

public POA getPOA()

getProperty

public Object getProperty(String key)
Method invoked to get the value of a property defined in the notification module

get_all_channels

public int[] get_all_channels()
The get_all_channels operation returns a sequence of all of the unique numeric identifiers corresponding to Notification Service event channels which have been created by the target object.

get_event_channel

public EventChannel get_event_channel(int id)
The get_event_channel operation accepts as input a numeric value which is supposed to be the unique identifier of a Notification Service event channel that has been created by the target object. If this input value does not correspond to such a unique identifier, the ChannelNotFound exception is raised. Otherwise, the operation returns the object reference of the Notification Service event channel corresponding to the input identifier.

isConsumerAdminMaxPerformance

public boolean isConsumerAdminMaxPerformance()
The methods returns true if the consumer admin threads should be configured as MaxPerformance

isConsumerProxyMaxPerformance

public boolean isConsumerProxyMaxPerformance()
The methods returns true if the supplier proxy threads should be configured as MaxPerformance

isQueueMaxPerformance

public boolean isQueueMaxPerformance()
The methods returns true if the event queue should be configured as MaxPerformance

isSupplierAdminMaxPerformance

public boolean isSupplierAdminMaxPerformance()
The methods returns true if the supplier admin threads should be configured as MaxPerformance

isSupplierProxyMaxPerformance

public boolean isSupplierProxyMaxPerformance()
The methods returns true if the consumer proxy threads should be configured as MaxPerformance

recoveryFinished

public void recoveryFinished()
This method is invoked when all the EventChannels were recovered. It is used to initialize variables like _nextChannelId and _recycledChannelIds.