org.jacorb.events

Class ProxyPushSupplierImpl

Implemented Interfaces:
InvokeHandler, ProxyPushSupplierOperations, PushSupplierOperations

public class ProxyPushSupplierImpl
extends ProxyPushSupplierPOA

Implementation of COSEventChannelAdmin interface; ProxyPushSupplier. This defines connect_push_consumer() and disconnect_push_supplier(). Helper method will push a method to the registered consumer. 2002/23/08 JFC OMG EventService Specification 1.1 page 2-7 states: "Registration is a two step process. An event-generating application first obtains a proxy consumer from a channel, then 'connects' to the proxy consumer by providing it with a supplier. ... The reason for the two step registration process..." Modifications to support the above have been made as well as to support section 2.1.5 "Disconnection Behavior" on page 2-4.

Version:
$Id: ProxyPushSupplierImpl.java,v 1.8 2004/05/06 12:39:58 nicolas Exp $

Author:
Jeff Carlson, Joerg v. Frantzius, Rainer Lischetzki, Gerald Brose

Constructor Summary

ProxyPushSupplierImpl(EventChannelImpl ec, ORB orb, POA poa)
Constructor - to be called by EventChannel

Method Summary

POA
_default_POA()
Override this method from the Servant baseclass.
void
connect_push_consumer(PushConsumer pushConsumer)
fuers ProxyPushSupplier Interface.
void
disconnect_push_supplier()
fuers PushSupplier Interface See EventService v 1.1 specification section 2.1.2.
protected void
push_to_consumer(Any event)
Methoden, die von unserem EventChannel aufgerufen werden

Methods inherited from class org.omg.CosEventChannelAdmin.ProxyPushSupplierPOA

_all_interfaces, _invoke, _this, _this

Methods inherited from class org.omg.PortableServer.Servant

_all_interfaces, _default_POA, _get_delegate, _get_interface, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object

Constructor Details

ProxyPushSupplierImpl

protected ProxyPushSupplierImpl(EventChannelImpl ec,
                                ORB orb,
                                POA poa)
Constructor - to be called by EventChannel

Method Details

_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 interface Servant


connect_push_consumer

public void connect_push_consumer(PushConsumer pushConsumer)
            throws AlreadyConnected,
                   BAD_PARAM
fuers ProxyPushSupplier Interface. As stated by the EventService specification 1.1 section 2.3.7: "If a ProxyPushSupplier is already connected to a PushConsumer, then the AlreadyConnected exception is raised." and "Implementations shall raise the CORBA standard BAD_PARAM exception if a nil object reference is passed to the connect_push_consumer."
Specified by:
connect_push_consumer in interface ProxyPushSupplierOperations


disconnect_push_supplier

public void disconnect_push_supplier()
fuers PushSupplier Interface See EventService v 1.1 specification section 2.1.2. 'disconnect_push_supplier terminates the event communication; it releases resources used at the supplier to support event communication. Calling this causes the implementation to call disconnect_push_consumer operation on the corresponding PushSupplier interface (if that iterface is known).' See EventService v 1.1 specification section 2.1.5. This method should adhere to the spec as it a) causes a call to the corresponding disconnect on the connected supplier, b) 'If a consumer or supplier has received a disconnect call and subsequently receives another disconnect call, it shall raise a CORBA::OBJECT_NOT_EXIST exception.
Specified by:
disconnect_push_supplier in interface PushSupplierOperations


push_to_consumer

protected void push_to_consumer(Any event)
Methoden, die von unserem EventChannel aufgerufen werden