CosEventChannelAdmin.idl

Go to the documentation of this file.
00001 /**
00002  * @file CosEventChannelAdmin.idl
00003  *
00004  * @brief Define the CosEventChannelAdmin module
00005  *
00006  * CosEventChannelAdmin.idl,v 1.7 2001/09/17 20:50:34 coryan Exp
00007  *
00008  * Described in CORBAservices: Common Object Services Specification,
00009  * chapter 4.
00010  *
00011  * CosEventChannelAdmin Module, page 4-15 includes the following
00012  * interfaces: ProxyPushConsumer, ProxyPullSupplier,
00013  * ProxyPullConsumer, ProxyPushSupplier, ConsumerAdmin, SupplierAdmin,
00014  * EventChannel
00015  *
00016  * The Event Service IDL can be downloaded from
00017  * ftp://www.omg.org/pub/docs/formal/97-11-02.idl
00018  *
00019  * The complete specification is available from:
00020  * http://www.omg.org/technology/documents/formal/event_service.htm
00021  *
00022  * @author Pradeep Gore <pradeep@cs.wustl.edu>
00023  */
00024 #ifndef TAO_EVENTCHANNELADMIN_IDL
00025 #define TAO_EVENTCHANNELADMIN_IDL
00026 
00027 #include "CosEventComm.idl"
00028 
00029 #pragma prefix "omg.org"
00030 
00031 /**
00032  * @namespace CosEventChannelAdmin
00033  *
00034  * @brief Define the interfaces implemented by providers of the CORBA
00035  * Event Service.
00036  */
00037 module CosEventChannelAdmin
00038 {
00039   /**
00040    * @exception AlreadyConnected
00041    *
00042    * @brief Exception raised if the user tries to connect to an
00043    * already connected proxy
00044    */
00045   exception AlreadyConnected {};
00046 
00047   /**
00048    * @exception TypeError
00049    *
00050    * @brief Exception raised in Typed Event Services if there is a
00051    * mismatch between the proxy and its peer (supplier or consumer.)
00052    */
00053   exception TypeError {};
00054 
00055   /**
00056    * @interface ProxyPushConsumer
00057    *
00058    * @brief Interface used by push-style suppliers.
00059    *
00060    * The application can use the methods derived from
00061    * CosEventComm::PushConsumer to disconnect from the Event Service
00062    * and push events.
00063    */
00064   interface ProxyPushConsumer : CosEventComm::PushConsumer
00065   {
00066     /// Connect a push-style supplier to the Event Service
00067     /**
00068      * Before pushing events into its Proxy the application must call
00069      * the following operation.
00070      *
00071      * @param push_supplier Callback interface, invoked by the Event
00072      *        Service if it is destroyed while the push-style supplier
00073      *        is still connected. If the argument is nil the callback
00074      *        is not invoked.
00075      * @throws AlreadyConnected if the operation is called a second
00076      *   time.
00077      */
00078     void connect_push_supplier (in CosEventComm::PushSupplier push_supplier)
00079       raises (AlreadyConnected);
00080   };
00081 
00082   /**
00083    * @interface ProxyPushSupplier
00084    *
00085    * @brief Interface used by push-style consumers
00086    *
00087    * Push-style consumers used this interface to connect and
00088    * disconnect from the Event Service.
00089    *
00090    * The disconnect_push_supplier() operation, derived from the
00091    * CosEventEventComm::PushSupplier interface, is used to disconnect
00092    * the ProxyPushSupplier and reclaim all resources attached to it
00093    * from the Event Service.
00094    */
00095   interface ProxyPushSupplier : CosEventComm::PushSupplier
00096   {
00097     /// Connect a push-style consumer to the Event Service.
00098     /**
00099      * The following operation must be invoked before the Event
00100      * Service can deliver any events to the consumer.
00101      *
00102      * @param push_consumer The consumer, must be non-nil.
00103      * @throws CORBA::BAD_PARAM if the consumer argument is nil.
00104      * @throws AlreadyConnected if the operation is called a second
00105      *   time.
00106      * @throws TypeError In Typed Event Services if the consumer does
00107      *   not match the expected type.
00108      */
00109     void connect_push_consumer (in CosEventComm::PushConsumer push_consumer)
00110       raises (AlreadyConnected, TypeError);
00111   };
00112 
00113   /**
00114    * @interface ProxyPullSupplier
00115    *
00116    * @brief Interface used by pull-style consumers.
00117    *
00118    * Pull-style suppliers use this interface to connect and disconnect
00119    * from the Event Service.
00120    *
00121    * The disconnect_pull_supplier() operation, derived from
00122    * CosEventComm::PullSupplier, is used by the application to
00123    * disconnect from the Event Service.
00124    * The application can use the pull() and try_pull() operations to
00125    * pull data from the Event Service.
00126    */
00127   interface ProxyPullSupplier : CosEventComm::PullSupplier
00128   {
00129     /// Connect a pull consumer to the Event Service.
00130     /**
00131      * Applications cannot pull events before this operation is
00132      * invoked.
00133      *
00134      * @param pull_consumer Callback interface used to inform the
00135      *   the application when the Event Service is destroyed.  The
00136      *   argument can be nil.
00137      * @throws AlreadyConnected if the operation is called a second
00138      *   time.
00139      */
00140     void connect_pull_consumer (in CosEventComm::PullConsumer pull_consumer)
00141       raises (AlreadyConnected);
00142   };
00143 
00144   /**
00145    * @interface ProxyPullConsumer
00146    *
00147    * @brief Interface used by pull-style suppliers.
00148    *
00149    * Pull-style consumers use this interface to connect, disconnect
00150    * and pull events from the Event Service.
00151    *
00152    * The disconnect_pull_consumer() operation, derived from
00153    * CosEventEventComm::PullConsumer, is used to disconnect from the
00154    * Event Service.
00155    */
00156   interface ProxyPullConsumer : CosEventComm::PullConsumer
00157   {
00158     /// Connect a pull supplier to the Event Service.
00159     /**
00160      * The Event Service will not start pulling events until this
00161      * operation is invoked.
00162      *
00163      * @param pull_supplier Callback interface used to (1) inform the
00164      *   application when the Event Service is destroyed, and (2) pull
00165      *   events from the application.  The argument cannot be nil.
00166      * @throws CORBA::BAD_PARAM if the pull_supplier argument is nil.
00167      * @throws AlreadyConnected if the operation is called a second
00168      *   time.
00169      * @throws TypeError In Typed Event Services if the consumer does
00170      *   not match the expected type.
00171      */
00172       void connect_pull_supplier (in CosEventComm::PullSupplier pull_supplier)
00173         raises (AlreadyConnected, TypeError);
00174     };
00175 
00176   /**
00177    * @interface ConsumerAdmin
00178    *
00179    * @brief Abstract Factory used to create proxies for pull-style and
00180    * push-style consumers.
00181    */
00182   interface ConsumerAdmin
00183   {
00184     /// Create a new ProxyPushSupplier object.
00185     ProxyPushSupplier obtain_push_supplier ();
00186 
00187     /// Create a new ProxyPullSupplier object.
00188     ProxyPullSupplier obtain_pull_supplier ();
00189   };
00190 
00191   /**
00192    * @interface SupplierAdmin
00193    *
00194    * @brief Abstract Factory used to create proxies for pull-style and
00195    * push-style suppliers.
00196    */
00197   interface SupplierAdmin
00198   {
00199     /// Create a new ProxyPushConsumer object.
00200     ProxyPushConsumer obtain_push_consumer ();
00201 
00202     /// Create a new ProxyPullConsumer object.
00203     ProxyPullConsumer obtain_pull_consumer ();
00204   };
00205 
00206   /**
00207    * @interface EventChannel
00208    *
00209    * @brief Main interface for the Event Service.
00210    */
00211   interface EventChannel
00212   {
00213     /// Obtain a ConsumerAdmin interface for this EventChannel
00214     /**
00215      * Normally a single EventChannel provides a single ConsumerAdmin,
00216      * but advanced ECs, for example, those based in the
00217      * CosNotification service, can provide multiple ConsumerAdmin
00218      * interfaces.
00219      */
00220     ConsumerAdmin for_consumers ();
00221 
00222     /// Obtain a SupplierAdmin interface for this EventChannel
00223     /**
00224      * Normally a single EventChannel provides a single SupplierAdmin,
00225      * but advanced ECs, for example, those based in the
00226      * CosNotification service, can provide multiple SupplierAdmin
00227      * interfaces.
00228      */
00229     SupplierAdmin for_suppliers ();
00230 
00231     /// Destroy the EventChannel
00232     /**
00233      * Calling this operation destroys the EventChannel, its
00234      * ConsumerAdmin and SupplierAdmin interfaces as well as the
00235      * proxies obtained from those.
00236      * Any consumers or suppliers still connected are notified of the
00237      * destruction.  In some cases, the process running the
00238      * EventChannel is terminated too.
00239      */
00240     void destroy ();
00241   };
00242 };
00243 
00244 #pragma prefix ""
00245 
00246 #endif /* TAO_EVENTCHANNELADMIN_IDL */

Generated on Thu Nov 9 13:18:18 2006 for TAO_CosEvent by doxygen 1.3.6