org.jacorb.notification
Class EventChannelImpl

java.lang.Object
  extended byorg.omg.PortableServer.Servant
      extended byorg.omg.CosNotifyChannelAdmin.EventChannelPOA
          extended byorg.jacorb.notification.EventChannelImpl
All Implemented Interfaces:
AdminPropertiesAdminOperations, org.apache.avalon.framework.configuration.Configurable, Disposable, EventChannelOperations, EventChannelOperations, InvokeHandler, ManageableServant, QoSAdminOperations

public class EventChannelImpl
extends EventChannelPOA
implements Disposable, ManageableServant, org.apache.avalon.framework.configuration.Configurable

Version:
$Id: EventChannelImpl.java,v 1.23 2004/05/06 12:39:59 nicolas Exp $
Author:
Alphonse Bendt

Method Summary
 POA _default_POA()
          Override this method from the Servant baseclass.
 Object activate()
           
 void addAdminEventListener(AdminEventListener l)
           
 void configure(org.apache.avalon.framework.configuration.Configuration conf)
           
 void deactivate()
           
 ConsumerAdmin default_consumer_admin()
          The default_consumer_admin attribute is a readonly attribute that maintains a reference to the default ConsumerAdmin instance associated with the target EventChannel instance.
 FilterFactory default_filter_factory()
          The default_filter_factory attribute is a readonly attribute that maintains an object reference to the default factory to be used by the EventChannel instance with which it is associated for creating filter objects.
 SupplierAdmin default_supplier_admin()
          The default_supplier_admin attribute is a readonly attribute that maintains a reference to the default SupplierAdmin instance associated with the target EventChannel instance.
 void destroy()
          destroy this Channel, all created Admins and all Proxies.
 void dispose()
          Dispose this Object.
 ConsumerAdmin for_consumers()
          Return the consumerAdmin interface (event style)
 SupplierAdmin for_suppliers()
          Return the supplierAdmin interface (event style)
 Property[] get_admin()
           
 int[] get_all_consumeradmins()
           
 int[] get_all_supplieradmins()
           
 ConsumerAdmin get_consumeradmin(int identifier)
           
 Property[] get_qos()
           
 SupplierAdmin get_supplieradmin(int identifier)
           
 java.util.List getAllConsumerAdmins()
          fetch the List of all ConsumerAdmins that are connected to this EventChannel.
 ChannelContext getChannelContext()
           
 java.lang.String getIOR()
           
 int getKey()
           
 int getMaxNumberOfConsumers()
           
 int getMaxNumberOfSuppliers()
           
 int getNumberOfConnectedClients()
          get the number of clients connected to this event channel. the number is the total of all Suppliers and Consumers connected to this channel.
 Servant getServant()
           
 boolean isPersistent()
           
 EventChannelFactory MyFactory()
          The MyFactory attribute is a readonly attribute that maintains the object reference of the event channel factory, which created a given Notification Service EventChannel instance.
 ConsumerAdmin new_for_consumers(InterFilterGroupOperator filterGroupOperator, IntHolder intHolder)
          The new_for_consumers operation is invoked to create a new Notification Service style ConsumerAdmin instance.
 SupplierAdmin new_for_suppliers(InterFilterGroupOperator filterGroupOperator, IntHolder intHolder)
           
 void preActivate()
           
 void removeAdminEventListener(AdminEventListener l)
           
 void set_admin(Property[] adminProps)
           
 void set_qos(Property[] props)
           
 void setKey(int key)
           
 void setORB(ORB orb)
           
 void setPOA(POA poa)
           
 void validate_qos(Property[] props, NamedPropertyRangeSeqHolder namedPropertySeqHolder)
           
 
Methods inherited from class org.omg.CosNotifyChannelAdmin.EventChannelPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_get_delegate, _get_interface_def, _get_interface, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration conf)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

preActivate

public void preActivate()
Specified by:
preActivate in interface ManageableServant

setKey

public void setKey(int key)

setORB

public void setORB(ORB orb)
Specified by:
setORB in interface ManageableServant

setPOA

public void setPOA(POA poa)
Specified by:
setPOA in interface ManageableServant

getServant

public Servant getServant()

activate

public Object activate()
Specified by:
activate in interface ManageableServant

addAdminEventListener

public void addAdminEventListener(AdminEventListener l)

removeAdminEventListener

public void removeAdminEventListener(AdminEventListener l)

MyFactory

public EventChannelFactory MyFactory()
The MyFactory attribute is a readonly attribute that maintains the object reference of the event channel factory, which created a given Notification Service EventChannel instance.

Specified by:
MyFactory in interface EventChannelOperations

default_consumer_admin

public ConsumerAdmin default_consumer_admin()
The default_consumer_admin attribute is a readonly attribute that maintains a reference to the default ConsumerAdmin instance associated with the target EventChannel instance. Each EventChannel instance has an associated default ConsumerAdmin instance, which exists upon creation of the channel and is assigned the unique identifier of zero. Subsequently, clients can create additional Event Service style ConsumerAdmin instances by invoking the inherited operation, and additional Notification Service style ConsumerAdmin instances by invoking the new_for_consumers operation defined by the EventChannel interface.

Specified by:
default_consumer_admin in interface EventChannelOperations

default_supplier_admin

public SupplierAdmin default_supplier_admin()
The default_supplier_admin attribute is a readonly attribute that maintains a reference to the default SupplierAdmin instance associated with the target EventChannel instance. Each EventChannel instance has an associated default SupplierAdmin instance, which exists upon creation of the channel and is assigned the unique identifier of zero. Subsequently, clients can create additional Event Service style SupplierAdmin instances by invoking the inherited for_suppliers operation, and additional Notification Service style SupplierAdmin instances by invoking the new_for_suppliers operation defined by the EventChannel interface.

Specified by:
default_supplier_admin in interface EventChannelOperations

default_filter_factory

public FilterFactory default_filter_factory()
The default_filter_factory attribute is a readonly attribute that maintains an object reference to the default factory to be used by the EventChannel instance with which it is associated for creating filter objects. If the target channel does not support a default filter factory, the attribute will maintain the value of OBJECT_NIL.

Specified by:
default_filter_factory in interface EventChannelOperations

new_for_consumers

public ConsumerAdmin new_for_consumers(InterFilterGroupOperator filterGroupOperator,
                                       IntHolder intHolder)
The new_for_consumers operation is invoked to create a new Notification Service style ConsumerAdmin instance. The operation accepts as an input parameter a boolean flag, which indicates whether AND or OR semantics will be used when combining the filter objects associated with the newly created ConsumerAdmin instance with those associated with a supplier proxy, which was created by the ConsumerAdmin during the evaluation of each event against a set of filter objects. The new instance is assigned a unique identifier by the target EventChannel instance that is unique among all ConsumerAdmin instances currently associated with the channel. Upon completion, the operation returns the reference to the new ConsumerAdmin instance as the result of the operation, and the unique identifier assigned to the new ConsumerAdmin instance as the output parameter.

Specified by:
new_for_consumers in interface EventChannelOperations

new_for_suppliers

public SupplierAdmin new_for_suppliers(InterFilterGroupOperator filterGroupOperator,
                                       IntHolder intHolder)
Specified by:
new_for_suppliers in interface EventChannelOperations

get_consumeradmin

public ConsumerAdmin get_consumeradmin(int identifier)
                                throws AdminNotFound
Specified by:
get_consumeradmin in interface EventChannelOperations
Throws:
AdminNotFound

get_supplieradmin

public SupplierAdmin get_supplieradmin(int identifier)
                                throws AdminNotFound
Specified by:
get_supplieradmin in interface EventChannelOperations
Throws:
AdminNotFound

get_all_consumeradmins

public int[] get_all_consumeradmins()
Specified by:
get_all_consumeradmins in interface EventChannelOperations

get_all_supplieradmins

public int[] get_all_supplieradmins()
Specified by:
get_all_supplieradmins in interface EventChannelOperations

get_admin

public Property[] get_admin()
Specified by:
get_admin in interface AdminPropertiesAdminOperations

get_qos

public Property[] get_qos()
Specified by:
get_qos in interface QoSAdminOperations

set_qos

public void set_qos(Property[] props)
             throws UnsupportedQoS
Specified by:
set_qos in interface QoSAdminOperations
Throws:
UnsupportedQoS

validate_qos

public void validate_qos(Property[] props,
                         NamedPropertyRangeSeqHolder namedPropertySeqHolder)
                  throws UnsupportedQoS
Specified by:
validate_qos in interface QoSAdminOperations
Throws:
UnsupportedQoS

set_admin

public void set_admin(Property[] adminProps)
               throws UnsupportedAdmin
Specified by:
set_admin in interface AdminPropertiesAdminOperations
Throws:
UnsupportedAdmin

destroy

public void destroy()
destroy this Channel, all created Admins and all Proxies.

Specified by:
destroy in interface EventChannelOperations

deactivate

public void deactivate()
Specified by:
deactivate in interface ManageableServant

dispose

public void dispose()
Description copied from interface: Disposable
Dispose this Object. Free all associated Ressources allocated by this Object. The Object may not be used after a call to dispose.

Specified by:
dispose in interface Disposable

for_consumers

public ConsumerAdmin for_consumers()
Return the consumerAdmin interface (event style)

Specified by:
for_consumers in interface EventChannelOperations

for_suppliers

public SupplierAdmin for_suppliers()
Return the supplierAdmin interface (event style)

Specified by:
for_suppliers in interface EventChannelOperations

_default_POA

public POA _default_POA()
Override this method from the Servant baseclass. Fintan Bolton in his book "Pure CORBA" suggests that you override this method to avoid the risk that a servant object (like this one) could be activated by the wrong POA object.

Overrides:
_default_POA in class Servant

getAllConsumerAdmins

public java.util.List getAllConsumerAdmins()
fetch the List of all ConsumerAdmins that are connected to this EventChannel.


getKey

public int getKey()

getIOR

public java.lang.String getIOR()

getChannelContext

public ChannelContext getChannelContext()

isPersistent

public boolean isPersistent()

getNumberOfConnectedClients

public int getNumberOfConnectedClients()
get the number of clients connected to this event channel. the number is the total of all Suppliers and Consumers connected to this channel.


getMaxNumberOfSuppliers

public int getMaxNumberOfSuppliers()

getMaxNumberOfConsumers

public int getMaxNumberOfConsumers()