org.jacorb.notification
Class EventChannelFactoryImpl

java.lang.Object
  extended byorg.jacorb.notification.AbstractChannelFactory
      extended byorg.jacorb.notification.EventChannelFactoryImpl
All Implemented Interfaces:
org.picocontainer.Disposable, Disposable, EventChannelFactoryOperations, JacORBEventChannelFactoryOperations, ManageableServant

public class EventChannelFactoryImpl
extends AbstractChannelFactory
implements JacORBEventChannelFactoryOperations

EventChannelFactoryImpl is a implementation of the EventChannelFactory interface which 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 routing, 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.

Version:
$Id: EventChannelFactoryImpl.java,v 1.44 2005/08/21 13:29:03 alphonse.bendt Exp $
Author:
Alphonse Bendt

Field Summary
 
Fields inherited from class org.jacorb.notification.AbstractChannelFactory
config_, container_, logger_, thisRef_
 
Constructor Summary
EventChannelFactoryImpl(org.picocontainer.MutablePicoContainer container, ORB orb)
           
 
Method Summary
protected  Object create_abstract_channel(Property[] admin, Property[] qos, IntHolder id)
           
 EventChannel create_channel(Property[] qualitiyOfServiceProperties, Property[] administrativeProperties, IntHolder channelIdentifier)
          The create_channel operation is invoked to create a new instance of the Notification Service style event channel.
 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.
 EventChannel get_event_channel(int id)
          The get_event_channel operation accepts as input a numeric value that is supposed to be the unique identifier of a Notification Service event channel, which has been created by the target object.
 EventChannelFactory getEventChannelFactory()
           
protected  java.lang.String getObjectName()
           
 Servant getServant()
           
protected  java.lang.String getShortcut()
           
protected  AbstractEventChannel newEventChannel()
           
 
Methods inherited from class org.jacorb.notification.AbstractChannelFactory
_default_POA, activate, addToChannels, create_channel_servant, deactivate, destroy, dispose, get_event_channel_servant, getAllChannels, getChannelIterator, getConfiguration, getCorbaLoc, getIOR, getLocalAddress, getLocalPort, getORB, newContainerForChannel, newFactory, newFactory, registerName, registerName, setDestroyMethod, shutdown, unregisterName, writeIOR
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jacorb.notification.JacORBEventChannelFactoryOperations
destroy
 

Constructor Detail

EventChannelFactoryImpl

public EventChannelFactoryImpl(org.picocontainer.MutablePicoContainer container,
                               ORB orb)
                        throws UserException
Method Detail

getShortcut

protected java.lang.String getShortcut()
Specified by:
getShortcut in class AbstractChannelFactory

getObjectName

protected java.lang.String getObjectName()
Specified by:
getObjectName in class AbstractChannelFactory

create_channel

public EventChannel create_channel(Property[] qualitiyOfServiceProperties,
                                   Property[] administrativeProperties,
                                   IntHolder channelIdentifier)
                            throws UnsupportedAdmin,
                                   UnsupportedQoS
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 administrative property settings, the UnsupportedAdmin exception is raised This exception contains as data a sequence of data structures, each 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 that might be returned are described in Notification Service Specification Table 2-5 on page 2-46.
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.

Specified by:
create_channel in interface EventChannelFactoryOperations
Parameters:
qualitiyOfServiceProperties - a list of name-value pairs, which specify the initial QoS property settings for the new channel
administrativeProperties - a list of name-value pairs, which specify the initial administrative property settings for the new channel
channelIdentifier - a reference to the new event channel
Returns:
a newly created event channel
Throws:
UnsupportedAdmin - if no implementation supports the requested administrative settings
UnsupportedQoS - if no implementation supports the requested QoS settings

newEventChannel

protected AbstractEventChannel newEventChannel()
Specified by:
newEventChannel in class AbstractChannelFactory

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.

Specified by:
get_all_channels in interface EventChannelFactoryOperations
Returns:
an int[] value

get_event_channel

public EventChannel get_event_channel(int id)
                               throws ChannelNotFound
The get_event_channel operation accepts as input a numeric value that is supposed to be the unique identifier of a Notification Service event channel, which 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.

Specified by:
get_event_channel in interface EventChannelFactoryOperations
Parameters:
id - an int the unique identifier of a Notification Service event channel
Returns:
an EventChannel corresponding to the input identifier
Throws:
ChannelNotFound - if the input value does not correspond to a Notification Service event channel

getEventChannelFactory

public EventChannelFactory getEventChannelFactory()

getServant

public Servant getServant()
Specified by:
getServant in class AbstractChannelFactory

create_abstract_channel

protected Object create_abstract_channel(Property[] admin,
                                         Property[] qos,
                                         IntHolder id)
                                  throws UnsupportedAdmin,
                                         UnsupportedQoS
Specified by:
create_abstract_channel in class AbstractChannelFactory
Throws:
UnsupportedAdmin
UnsupportedQoS