org.openorb.event
Class ProxyPullSupplierImpl

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by org.omg.CosEventChannelAdmin.ProxyPullSupplierPOA
          extended by org.openorb.event.ProxyPullSupplierImpl
All Implemented Interfaces:
org.omg.CORBA.portable.InvokeHandler, ProxyPullSupplierOperations, PullSupplierOperations

public class ProxyPullSupplierImpl
extends ProxyPullSupplierPOA

A consumer requests event data from the supplier by invoking either the pull operation or the try_pull operation on the supplier.

Author:
Jerome Daniel, Olivier Modica

Constructor Summary
ProxyPullSupplierImpl(EventChannelImpl channel)
          Constructor
 
Method Summary
 void connect_pull_consumer(PullConsumer pullConsumer)
          A nil object reference may be passed to the connect_pull_consumer operation; if so a channel cannot invoke a disconnect_pull_consumer operation on the consumer; the consumer may be disconnected from the channel without being informed.
 void disconnect_pull_supplier()
          The disconnect_pull_supplier operation terminates the event communication; it releases resources used at the supplier to support the event communication.
 org.omg.CORBA.Any pull()
          The pull operation blocks until the event data is available or an exception is raised.
 void pushEventToSupplier(org.omg.CORBA.Any any)
          Passe l'evenement au consumer
 org.omg.CORBA.Any try_pull(org.omg.CORBA.BooleanHolder has_event)
          The try_pull operation does not block: if the event data is available, it returns the event data and sets the has_event parameter to true; if the event is not available, it sets the has_event parameter to false and the event data is returned as long with an undefined value.
 
Methods inherited from class org.omg.CosEventChannelAdmin.ProxyPullSupplierPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyPullSupplierImpl

public ProxyPullSupplierImpl(EventChannelImpl channel)
Constructor

Method Detail

connect_pull_consumer

public void connect_pull_consumer(PullConsumer pullConsumer)
                           throws AlreadyConnected
A nil object reference may be passed to the connect_pull_consumer operation; if so a channel cannot invoke a disconnect_pull_consumer operation on the consumer; the consumer may be disconnected from the channel without being informed.

Parameters:
pullConsumer - the pull consumer to connect
Throws:
AlreadyConnected - This exception is raised if the supplier is already connected

pull

public org.omg.CORBA.Any pull()
                       throws Disconnected
The pull operation blocks until the event data is available or an exception is raised. It returns the event data to the consumer.

Returns:
the event data
Throws:
Disconnected - If the event communication has already been disconnected, the Disconnected exception is raised.

try_pull

public org.omg.CORBA.Any try_pull(org.omg.CORBA.BooleanHolder has_event)
                           throws Disconnected
The try_pull operation does not block: if the event data is available, it returns the event data and sets the has_event parameter to true; if the event is not available, it sets the has_event parameter to false and the event data is returned as long with an undefined value.

Parameters:
has_event - true if the event is available, flase otherwise
Returns:
the event data
Throws:
Disconnected - If the event communication has already been disconnected, the Disconnected exception is raised.

disconnect_pull_supplier

public void disconnect_pull_supplier()
The disconnect_pull_supplier operation terminates the event communication; it releases resources used at the supplier to support the event communication. The PullSupplier object reference is disposed.


pushEventToSupplier

public void pushEventToSupplier(org.omg.CORBA.Any any)
Passe l'evenement au consumer