CosNotifyChannelAdmin.idl

Go to the documentation of this file.
00001 /**
00002  * @file CosNotifyChannelAdmin.idl
00003  *
00004  * @brief Define the CosNotifyChannel module
00005  *
00006  * CosNotifyChannelAdmin.idl,v 1.6 2004/09/14 18:07:10 wilson_d Exp
00007  *
00008  * This module is taken from the standard CORBA Notification Service
00009  * 1.0, as described in:
00010  *
00011  * http://www.omg.org/technology/documents/formal/notification_service.htm
00012  *
00013  * In particular the following two documents were used:
00014  * formal/2000-06-20
00015  * formal/01-03-03
00016  *
00017  * @author Pradeep Gore <pradeep@cs.wustl.edu>
00018  */
00019 
00020 #ifndef _COS_NOTIFY_CHANNEL_ADMIN_IDL_
00021 #define _COS_NOTIFY_CHANNEL_ADMIN_IDL_
00022 
00023 #include "CosNotification.idl"
00024 #include "CosNotifyFilter.idl"
00025 #include "CosNotifyComm.idl"
00026 #include "CosEventChannelAdmin.idl"
00027 
00028 #pragma prefix "omg.org"
00029 
00030 /**
00031  * @namespace CosNotifyChannelAdmin
00032  *
00033  * @brief Defines the interfaces to connect and manipulate the
00034  * Notification Service.
00035  */
00036 module CosNotifyChannelAdmin
00037 {
00038   /**
00039    * @exception ConnectionAlreadyActive
00040    *
00041    * @brief Exception Raised if an attempt is made to resume a
00042    * connection that has not been suspended.
00043    */
00044   exception ConnectionAlreadyActive {};
00045 
00046   /**
00047    * @exception ConnectionAlreadyInactive
00048    *
00049    * @brief Exception raised if an attempt is made to suspend a
00050    * connection already suspended.
00051    */
00052   exception ConnectionAlreadyInactive {};
00053 
00054   /**
00055    * @exception NotConnected
00056    *
00057    * @brief Exception raised if an attempt is made to suspend or
00058    *   resume a proxy that has not been connected.
00059    */
00060   exception NotConnected {};
00061 
00062   // Forward declarations
00063   interface ConsumerAdmin;
00064   interface SupplierAdmin;
00065   interface EventChannel;
00066   interface EventChannelFactory;
00067 
00068   /**
00069    * @enum ProxyType
00070    *
00071    * @brief Helper typedef to inspect the types of proxies connected
00072    *   to an EventChannel
00073    */
00074   enum ProxyType {
00075     /// A push-style proxy that uses the 'any' format
00076     PUSH_ANY,
00077     /// A pull-style proxy that uses the 'any' format
00078     PULL_ANY,
00079     /// A push-style proxy that uses structured events
00080     PUSH_STRUCTURED,
00081     /// A pull-style proxy that uses structured events
00082     PULL_STRUCTURED,
00083     /// A push-style proxy that uses event batches
00084     PUSH_SEQUENCE,
00085     /// A pull-style proxy that uses event batches
00086     PULL_SEQUENCE,
00087     /// A typed, push-style proxy
00088     PUSH_TYPED,
00089     /// A typed, pull-style proxy
00090     PULL_TYPED
00091   };
00092 
00093   /**
00094    * @enum ObtainInfoMode
00095    *
00096    * @brief Define the modes to fetch subscriptions and publication
00097    * lists from the Notification Service.
00098    */
00099   enum ObtainInfoMode {
00100     /// Get all the current subscriptions/publications, do not send
00101     /// updates to the peer
00102     ALL_NOW_UPDATES_OFF,
00103     /// Get all the current subscriptions/publications, send updates
00104     /// to the peer
00105     ALL_NOW_UPDATES_ON,
00106     /// Do not get any of the current subscriptions/publications, do
00107     /// not send updates to the peer either
00108     NONE_NOW_UPDATES_OFF,
00109     /// Do not get any of the current subscriptions/publications, but
00110     /// send updates to the peer
00111     NONE_NOW_UPDATES_ON
00112   };
00113 
00114   /**
00115    * @interface ProxyConsumer
00116    *
00117    * @brief Defines the interface shared by all consumer proxies
00118    *
00119    * Consumer proxies are used by suppliers to provide events into the
00120    * Notification Service, this interface captures the shared
00121    * operations in all those proxies.
00122    */
00123   interface ProxyConsumer
00124     : CosNotification::QoSAdmin
00125     , CosNotifyFilter::FilterAdmin
00126   {
00127     /// The style and event format for this proxy
00128     readonly attribute ProxyType MyType;
00129 
00130     /// The SupplierAdmin this proxy belongs to
00131     readonly attribute SupplierAdmin MyAdmin;
00132 
00133     /// Get the list of event types that this proxy could potentially
00134     /// forward to any consumer connected to the EventChannel
00135     /**
00136      * @param mode Describe how the subscriptions should be fetched
00137      * @return The list of current subscriptions, if requested in the
00138      * mode argument
00139      */
00140     CosNotification::EventTypeSeq obtain_subscription_types(
00141                                       in ObtainInfoMode mode );
00142 
00143     /// Validate a list of QoS properties for an event
00144     /**
00145      * Suppliers can provide events with specific QoS properties, the
00146      * following operation allows suppliers to verify if a given set
00147      * of QoS properties would be honored by the proxy.
00148      *
00149      * @param required_qos The QoS properties required by the supplier
00150      * @param available_qos If the QoS properties required are
00151      *   supported this argument returns any other QoS properties that
00152      *   the application may set without breaking the proxy
00153      *   capabilities.
00154      * @throws CosNotification::UnsupportedQoS if the QoS properties
00155      *   required cannot be supported. The exception describes the
00156      *   problems and any legal values in detail.
00157      */
00158     void validate_event_qos (
00159              in CosNotification::QoSProperties required_qos,
00160              out CosNotification::NamedPropertyRangeSeq available_qos)
00161       raises (CosNotification::UnsupportedQoS);
00162   };
00163 
00164   /**
00165    * @interface ProxySupplier
00166    *
00167    * @brief Defines the interface shared by all supplier proxies
00168    *
00169    * Supplier proxies are used by consumers to communicate with the
00170    * Notification Service, this interface captures the shared
00171    * operations in all those proxies.
00172    */
00173   interface ProxySupplier
00174     : CosNotification::QoSAdmin
00175     , CosNotifyFilter::FilterAdmin
00176   {
00177     /// The style and event format for this proxy
00178     readonly attribute ProxyType MyType;
00179 
00180     /// The ConsumerAdmin this proxy belongs to
00181     readonly attribute ConsumerAdmin MyAdmin;
00182 
00183     /// Get and set the mapping filter used to change the priority
00184     /// property for this proxy.
00185     /**
00186      * The filter is initialized to the nil reference
00187      */
00188     attribute CosNotifyFilter::MappingFilter priority_filter;
00189 
00190     /// Get and set the mapping filter used to change the lifetime
00191     /// property for this proxy.
00192     /**
00193      * The filter is initialized to the nil reference
00194      */
00195     attribute CosNotifyFilter::MappingFilter lifetime_filter;
00196 
00197     /// Get the list of event types that this proxy could potentially
00198     /// forward to its connected supplier
00199     /**
00200      * @param mode Describe how the publications should be fetched
00201      * @return The list of current subscriptions, if requested in the
00202      * mode argument
00203      */
00204     CosNotification::EventTypeSeq obtain_offered_types(
00205                                       in ObtainInfoMode mode );
00206 
00207     /// Validate a list of QoS properties for an event
00208     /**
00209      * Applications send events with specific QoS properties, the
00210      * following operation allows consumers to verify if a given set
00211      * of QoS properties would be honored by the proxy.
00212      *
00213      * @param required_qos The QoS properties required by the supplier
00214      * @param available_qos If the QoS properties required are
00215      *   supported this argument returns any other QoS properties that
00216      *   the application may set without breaking the proxy
00217      *   capabilities.
00218      * @throws CosNotification::UnsupportedQoS if the QoS properties
00219      *   required cannot be supported. The exception describes the
00220      *   problems and any legal values in detail.
00221      */
00222     void validate_event_qos (
00223              in CosNotification::QoSProperties required_qos,
00224              out CosNotification::NamedPropertyRangeSeq available_qos)
00225       raises (CosNotification::UnsupportedQoS);
00226   };
00227 
00228   /**
00229    * @interface ProxyPushConsumer
00230    *
00231    * @brief Defines the interface provided for push-style suppliers
00232    *   using the 'any' event format.
00233    */
00234   interface ProxyPushConsumer
00235     : ProxyConsumer
00236     , CosNotifyComm::PushConsumer
00237   {
00238     /// Connect a supplier to the proxy
00239     /**
00240      * Suppliers cannot push events into a ProxyPushConsumer until
00241      * this method is invoked.
00242      *
00243      * @param push_supplier the callback object used to inform the
00244      *   application if the event channel is destroyed.  If the
00245      *   argument is nil no destroy notification is provided.
00246      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00247      *   already connected, i.e. if this operation is invoked more than
00248      *   one time.
00249      */
00250     void connect_any_push_supplier (
00251              in CosEventComm::PushSupplier push_supplier)
00252       raises(CosEventChannelAdmin::AlreadyConnected);
00253   };
00254 
00255   /**
00256    * @interface StructuredProxyPushConsumer
00257    *
00258    * @brief Defines the interface provided for push-style suppliers
00259    *   using the 'structured' event format.
00260    */
00261   interface StructuredProxyPushConsumer
00262     : ProxyConsumer
00263     , CosNotifyComm::StructuredPushConsumer
00264   {
00265     /// Connect a supplier to the proxy
00266     /**
00267      * Suppliers cannot push events into a ProxyPushConsumer until
00268      * this method is invoked.
00269      *
00270      * @param push_supplier the callback object used to inform the
00271      *   application if the event channel is destroyed.  If the
00272      *   argument is nil no destroy notification is provided.
00273      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00274      *   already connected, i.e. if this operation is invoked more than
00275      *   one time.
00276      */
00277     void connect_structured_push_supplier (
00278              in CosNotifyComm::StructuredPushSupplier push_supplier)
00279       raises(CosEventChannelAdmin::AlreadyConnected);
00280   };
00281 
00282   /**
00283    * @interface SequenceProxyPushConsumer
00284    *
00285    * @brief Defines the interface provided for push-style suppliers
00286    *   using the 'batched' event format.
00287    */
00288   interface SequenceProxyPushConsumer
00289     : ProxyConsumer
00290     , CosNotifyComm::SequencePushConsumer
00291   {
00292     /// Connect a supplier to the proxy
00293     /**
00294      * Suppliers cannot push events into a ProxyPushConsumer until
00295      * this method is invoked.
00296      *
00297      * @param push_supplier the callback object used to inform the
00298      *   application if the event channel is destroyed.  If the
00299      *   argument is nil no destroy notification is provided.
00300      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00301      *   already connected, i.e. if this operation is invoked more than
00302      *   one time.
00303      */
00304     void connect_sequence_push_supplier (
00305              in CosNotifyComm::SequencePushSupplier push_supplier)
00306       raises(CosEventChannelAdmin::AlreadyConnected);
00307   };
00308 
00309 #ifdef TAO_HAS_NOTIFY_PULL_INTERFACES
00310 
00311   /**
00312    * @interface ProxyPullSupplier
00313    *
00314    * @brief Defines the interface provided for pull-style consumers
00315    *   using the 'any' event format.
00316    */
00317   interface ProxyPullSupplier
00318     : ProxySupplier
00319     , CosNotifyComm::PullSupplier
00320   {
00321     /// Connect a consumer to the proxy
00322     /**
00323      * The consumer cannot pull events until this operation is invoked.
00324      *
00325      * @param pull_consumer the callback object used to inform the
00326      *   application if the event channel is destroyed.  If the
00327      *   argument is nil no destroy notification is provided.
00328      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00329      *   already connected, i.e. if this operation is invoked more than
00330      *   one time.
00331      */
00332     void connect_any_pull_consumer (
00333              in CosEventComm::PullConsumer pull_consumer)
00334       raises(CosEventChannelAdmin::AlreadyConnected);
00335   };
00336 
00337   /**
00338    * @interface StructuredProxyPullSupplier
00339    *
00340    * @brief Defines the interface provided for pull-style consumers
00341    *   using the 'structured' event format.
00342    */
00343   interface StructuredProxyPullSupplier
00344     : ProxySupplier
00345     , CosNotifyComm::StructuredPullSupplier
00346   {
00347     /// Connect a consumer to the proxy
00348     /**
00349      * The consumer cannot pull events until this operation is invoked.
00350      *
00351      * @param pull_consumer the callback object used to inform the
00352      *   application if the event channel is destroyed.  If the
00353      *   argument is nil no destroy notification is provided.
00354      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00355      *   already connected, i.e. if this operation is invoked more than
00356      *   one time.
00357      */
00358     void connect_structured_pull_consumer (
00359              in CosNotifyComm::StructuredPullConsumer pull_consumer)
00360       raises(CosEventChannelAdmin::AlreadyConnected);
00361   };
00362 
00363   /**
00364    * @interface SequenceProxyPullSupplier
00365    *
00366    * @brief Defines the interface provided for pull-style consumer
00367    *   using the 'batched' event format.
00368    */
00369   interface SequenceProxyPullSupplier
00370     : ProxySupplier
00371     , CosNotifyComm::SequencePullSupplier
00372   {
00373     /// Connect a consumer to the proxy
00374     /**
00375      * The consumer cannot pull events until this operation is invoked.
00376      *
00377      * @param pull_consumer the callback object used to inform the
00378      *   application if the event channel is destroyed.  If the
00379      *   argument is nil no destroy notification is provided.
00380      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00381      *   already connected, i.e. if this operation is invoked more than
00382      *   one time.
00383      */
00384     void connect_sequence_pull_consumer (
00385              in CosNotifyComm::SequencePullConsumer pull_consumer)
00386       raises(CosEventChannelAdmin::AlreadyConnected);
00387   };
00388 
00389   /**
00390    * @interface ProxyPullConsumer
00391    *
00392    * @brief Defines the interface provided for pull-style suppliers
00393    *   using the 'any' event format.
00394    */
00395   interface ProxyPullConsumer
00396     : ProxyConsumer
00397     , CosNotifyComm::PullConsumer
00398   {
00399     /// Connect a supplier to the proxy
00400     /**
00401      * The event channel will not pull events from the supplier until
00402      * this operation is invoked.
00403      *
00404      * @param pull_supplier the callback object used to inform the
00405      *   application if the event channel is destroyed.
00406      * @throws CORBA::BAD_PARAM if the pull_supplier argument is nil
00407      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00408      *   already connected, i.e. if this operation is invoked more than
00409      *   one time.
00410      */
00411     void connect_any_pull_supplier (
00412              in CosEventComm::PullSupplier pull_supplier)
00413       raises(CosEventChannelAdmin::AlreadyConnected,
00414              CosEventChannelAdmin::TypeError );
00415 
00416     /// Suspend the connection, the event channel will stop pulling
00417     /// events.
00418     /**
00419      * @throws ConnectionAlreadyInactive if the method is invoked
00420      *   while the connection is suspended
00421      * @throws NotConnected if the method is invoked before the
00422      *   supplier connects
00423      */
00424     void suspend_connection()
00425       raises(ConnectionAlreadyInactive, NotConnected);
00426 
00427     /// Resume the connection, the event channel will start pulling
00428     /// events one more.
00429     /**
00430      * @throws ConnectionAlreadyActive if the method is invoked
00431      *   while the connection is active
00432      * @throws NotConnected if the method is invoked before the
00433      *   supplier connects
00434      */
00435     void resume_connection()
00436       raises(ConnectionAlreadyActive, NotConnected);
00437   };
00438 
00439   /**
00440    * @interface StructuredProxyPullConsumer
00441    *
00442    * @brief Defines the interface provided for pull-style suppliers
00443    *   using the 'structured' event format.
00444    */
00445   interface StructuredProxyPullConsumer
00446     : ProxyConsumer
00447     , CosNotifyComm::StructuredPullConsumer
00448   {
00449     /// Connect a supplier to the proxy
00450     /**
00451      * The event channel will not pull events from the supplier until
00452      * this operation is invoked.
00453      *
00454      * @param pull_supplier the callback object used to inform the
00455      *   application if the event channel is destroyed.
00456      * @throws CORBA::BAD_PARAM if the pull_supplier argument is nil
00457      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00458      *   already connected, i.e. if this operation is invoked more than
00459      *   one time.
00460      */
00461     void connect_structured_pull_supplier (
00462              in CosNotifyComm::StructuredPullSupplier pull_supplier)
00463       raises(CosEventChannelAdmin::AlreadyConnected,
00464              CosEventChannelAdmin::TypeError );
00465 
00466     /// Suspend the connection, the event channel will stop pulling
00467     /// events.
00468     /**
00469      * @throws ConnectionAlreadyInactive if the method is invoked
00470      *   while the connection is suspended
00471      * @throws NotConnected if the method is invoked before the
00472      *   supplier connects
00473      */
00474     void suspend_connection()
00475       raises(ConnectionAlreadyInactive, NotConnected);
00476 
00477     /// Resume the connection, the event channel will start pulling
00478     /// events one more.
00479     /**
00480      * @throws ConnectionAlreadyActive if the method is invoked
00481      *   while the connection is active
00482      * @throws NotConnected if the method is invoked before the
00483      *   supplier connects
00484      */
00485     void resume_connection()
00486       raises(ConnectionAlreadyActive, NotConnected);
00487   };
00488 
00489   /**
00490    * @interface SequenceProxyPullConsumer
00491    *
00492    * @brief Defines the interface provided for pull-style suppliers
00493    *   using the 'batched' event format.
00494    */
00495   interface SequenceProxyPullConsumer
00496     : ProxyConsumer
00497     , CosNotifyComm::SequencePullConsumer
00498   {
00499     /// Connect a supplier to the proxy
00500     /**
00501      * The event channel will not pull events from the supplier until
00502      * this operation is invoked.
00503      *
00504      * @param pull_supplier the callback object used to inform the
00505      *   application if the event channel is destroyed.
00506      * @throws CORBA::BAD_PARAM if the pull_supplier argument is nil
00507      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00508      *   already connected, i.e. if this operation is invoked more than
00509      *   one time.
00510      */
00511     void connect_sequence_pull_supplier (
00512              in CosNotifyComm::SequencePullSupplier pull_supplier)
00513       raises(CosEventChannelAdmin::AlreadyConnected,
00514              CosEventChannelAdmin::TypeError );
00515 
00516     /// Suspend the connection, the event channel will stop pulling
00517     /// events.
00518     /**
00519      * @throws ConnectionAlreadyInactive if the method is invoked
00520      *   while the connection is suspended
00521      * @throws NotConnected if the method is invoked before the
00522      *   supplier connects
00523      */
00524     void suspend_connection()
00525       raises(ConnectionAlreadyInactive, NotConnected);
00526 
00527     /// Resume the connection, the event channel will start pulling
00528     /// events one more.
00529     /**
00530      * @throws ConnectionAlreadyActive if the method is invoked
00531      *   while the connection is active
00532      * @throws NotConnected if the method is invoked before the
00533      *   supplier connects
00534      */
00535     void resume_connection()
00536       raises(ConnectionAlreadyActive, NotConnected);
00537   };
00538 #endif /* TAO_HAS_NOTIFY_PULL_INTERFACES */
00539 
00540   /**
00541    * @interface ProxyPushSupplier
00542    *
00543    * @brief Defines the interface provided for push-style consumers
00544    *   using the 'any' event format.
00545    */
00546   interface ProxyPushSupplier
00547     : ProxySupplier
00548     , CosNotifyComm::PushSupplier
00549   {
00550     /// Connect a consumer to the proxy
00551     /**
00552      * The event channel will not push events to the consumer until
00553      * this operation is invoked.
00554      *
00555      * @param push_consumer the callback object used to push events to
00556      *   the application and inform if the event channel is destroyed
00557      * @throws CORBA::BAD_PARAM if the push_consumer argument is nil
00558      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00559      *   already connected, i.e. if this operation is invoked more than
00560      *   one time.
00561      */
00562     void connect_any_push_consumer (
00563              in CosEventComm::PushConsumer push_consumer)
00564       raises(CosEventChannelAdmin::AlreadyConnected,
00565              CosEventChannelAdmin::TypeError );
00566 
00567     /// Suspend the connection, the event channel will stop pushing
00568     /// events to the consumer.
00569     /**
00570      * @throws ConnectionAlreadyInactive if the method is invoked
00571      *   while the connection is suspended
00572      * @throws NotConnected if the method is invoked before the
00573      *   supplier connects
00574      */
00575     void suspend_connection()
00576       raises(ConnectionAlreadyInactive, NotConnected);
00577 
00578     /// Resume the connection, the event channel will start pushing
00579     /// events to the consumer once more
00580     /**
00581      * @throws ConnectionAlreadyActive if the method is invoked
00582      *   while the connection is active
00583      * @throws NotConnected if the method is invoked before the
00584      *   supplier connects
00585      */
00586     void resume_connection()
00587       raises(ConnectionAlreadyActive, NotConnected);
00588   };
00589 
00590   /**
00591    * @interface StructuredProxyPushSupplier
00592    *
00593    * @brief Defines the interface provided for push-style consumers
00594    *   using the 'structured' event format.
00595    */
00596   interface StructuredProxyPushSupplier
00597     : ProxySupplier
00598     , CosNotifyComm::StructuredPushSupplier
00599   {
00600     /// Connect a consumer to the proxy
00601     /**
00602      * The event channel will not push events to the consumer until
00603      * this operation is invoked.
00604      *
00605      * @param push_consumer the callback object used to push events to
00606      *   the application and inform if the event channel is destroyed
00607      * @throws CORBA::BAD_PARAM if the push_consumer argument is nil
00608      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00609      *   already connected, i.e. if this operation is invoked more than
00610      *   one time.
00611      */
00612     void connect_structured_push_consumer (
00613              in CosNotifyComm::StructuredPushConsumer push_consumer)
00614       raises(CosEventChannelAdmin::AlreadyConnected,
00615              CosEventChannelAdmin::TypeError );
00616 
00617     /// Suspend the connection, the event channel will stop pushing
00618     /// events to the consumer.
00619     /**
00620      * @throws ConnectionAlreadyInactive if the method is invoked
00621      *   while the connection is suspended
00622      * @throws NotConnected if the method is invoked before the
00623      *   supplier connects
00624      */
00625     void suspend_connection()
00626       raises(ConnectionAlreadyInactive, NotConnected);
00627 
00628     /// Resume the connection, the event channel will start pushing
00629     /// events to the consumer once more
00630     /**
00631      * @throws ConnectionAlreadyActive if the method is invoked
00632      *   while the connection is active
00633      * @throws NotConnected if the method is invoked before the
00634      *   supplier connects
00635      */
00636     void resume_connection()
00637       raises(ConnectionAlreadyActive, NotConnected);
00638   };
00639 
00640   /**
00641    * @interface SequenceProxyPushSupplier
00642    *
00643    * @brief Defines the interface provided for push-style consumers
00644    *   using the 'batched' event format.
00645    */
00646   interface SequenceProxyPushSupplier
00647     : ProxySupplier
00648     , CosNotifyComm::SequencePushSupplier
00649   {
00650     /// Connect a consumer to the proxy
00651     /**
00652      * The event channel will not push events to the consumer until
00653      * this operation is invoked.
00654      *
00655      * @param push_consumer the callback object used to push events to
00656      *   the application and inform if the event channel is destroyed
00657      * @throws CORBA::BAD_PARAM if the push_consumer argument is nil
00658      * @throws CosEventChannelAdmin::AlreadyConnected if the proxy is
00659      *   already connected, i.e. if this operation is invoked more than
00660      *   one time.
00661      */
00662     void connect_sequence_push_consumer (
00663              in CosNotifyComm::SequencePushConsumer push_consumer)
00664       raises(CosEventChannelAdmin::AlreadyConnected,
00665              CosEventChannelAdmin::TypeError );
00666 
00667     /// Suspend the connection, the event channel will stop pushing
00668     /// events to the consumer.
00669     /**
00670      * @throws ConnectionAlreadyInactive if the method is invoked
00671      *   while the connection is suspended
00672      * @throws NotConnected if the method is invoked before the
00673      *   supplier connects
00674      */
00675     void suspend_connection()
00676       raises(ConnectionAlreadyInactive, NotConnected);
00677 
00678     /// Resume the connection, the event channel will start pushing
00679     /// events to the consumer once more
00680     /**
00681      * @throws ConnectionAlreadyActive if the method is invoked
00682      *   while the connection is active
00683      * @throws NotConnected if the method is invoked before the
00684      *   supplier connects
00685      */
00686     void resume_connection()
00687       raises(ConnectionAlreadyActive, NotConnected);
00688   };
00689 
00690   /// Each proxy is assigned a unique ID by its proxy admin
00691   typedef long ProxyID;
00692   /// Helper type to query or fetch multiple IDs simulatenously
00693   typedef sequence <ProxyID> ProxyIDSeq;
00694 
00695   /**
00696    * @enum ClientType
00697    *
00698    * @brief Helper type used to fetch proxies
00699    */
00700   enum ClientType {
00701     /// The proxy uses the 'any' event format
00702     ANY_EVENT,
00703     /// The proxy uses the 'structured' event format
00704     STRUCTURED_EVENT,
00705     /// The proxy uses the 'sequence' (or batch) event format
00706     SEQUENCE_EVENT
00707   };
00708 
00709   /**
00710    * @enum InterFilterGroupOperator
00711    *
00712    * @brief Define how multiple Filters are considered in a proxy
00713    *   admin
00714    */
00715   enum InterFilterGroupOperator {
00716     AND_OP,
00717     OR_OP
00718   };
00719 
00720   /// Each proxy admin is assigned a unique number by its EventChannel
00721   typedef long AdminID;
00722   /// List of Admin IDs
00723   typedef sequence<AdminID> AdminIDSeq;
00724 
00725   /**
00726    * @exception AdminNotFound
00727    *
00728    * @brief Exception raised if a lookup for a specific Admin ID
00729    *   fails.
00730    */
00731   exception AdminNotFound {};
00732 
00733   /**
00734    * @exception ProxyNotFound
00735    *
00736    * @brief Exception raised if a lookup for a specific Proxy ID
00737    *   fails.
00738    */
00739   exception ProxyNotFound {};
00740 
00741   /**
00742    * @struct AdminLimit
00743    *
00744    * @brief Helper structure to represent a violation of the limits in
00745    *   a proxy admin.
00746    */
00747   struct AdminLimit {
00748     CosNotification::PropertyName name;
00749     CosNotification::PropertyValue value;
00750   };
00751 
00752   /**
00753    * @exception AdminLimitExceeded
00754    *
00755    * @brief Exception raised if a limit in a proxy admin is breached
00756    */
00757   exception AdminLimitExceeded {
00758     /// The limit that caused the problem.
00759     AdminLimit admin_property_err;
00760   };
00761 
00762   /**
00763    * @interface ConsumerAdmin
00764    *
00765    * @brief Interface used to control and obtain the proxies used by
00766    *   consumers.
00767    */
00768   interface ConsumerAdmin
00769     : CosNotification::QoSAdmin
00770     , CosNotifyComm::NotifySubscribe
00771     , CosNotifyFilter::FilterAdmin
00772     , CosEventChannelAdmin::ConsumerAdmin
00773   {
00774     /// The ID assigned to this admin by its event channel
00775     readonly attribute AdminID MyID;
00776 
00777     /// The event channel this admin belongs to
00778     readonly attribute EventChannel MyChannel;
00779 
00780     /// How are multiple filters interpreted
00781     readonly attribute InterFilterGroupOperator MyOperator;
00782 
00783     /// A special mapping filter to change the priority property of
00784     /// events
00785     attribute CosNotifyFilter::MappingFilter priority_filter;
00786 
00787     /// A special mapping filter to change the lifetime property of
00788     /// events
00789     attribute CosNotifyFilter::MappingFilter lifetime_filter;
00790 
00791     /// Get the complete list of pull proxy suppliers
00792     readonly attribute ProxyIDSeq pull_suppliers;
00793 
00794     /// Get the complete list of push proxy suppliers
00795     readonly attribute ProxyIDSeq push_suppliers;
00796 
00797     /// Get an specific ProxySupplier
00798     /**
00799      * @param proxy_id The proxy ID that will be retrieved
00800      * @throws ProxyNotFound if the proxy_id is not found in this
00801      *   ConsumerAdmin
00802      */
00803     ProxySupplier get_proxy_supplier (in ProxyID proxy_id)
00804       raises (ProxyNotFound );
00805 
00806     /// Create a new pull-style proxy supplier
00807     /**
00808      * @param ctype The event format that the ProxySupplier should
00809      *   support
00810      * @param proxy_id The ID assigned to the new proxy supplier
00811      * @return The new ProxySupplier
00812      * @throws AdminLimitExceeded if a limit in this admin is reached,
00813      *   such as the maximum number of proxies.
00814      */
00815     ProxySupplier obtain_notification_pull_supplier (in ClientType ctype,
00816                                                      out ProxyID proxy_id)
00817       raises ( AdminLimitExceeded );
00818 
00819     /// Create a new push-style proxy supplier
00820     /**
00821      * @param ctype The event format that the ProxySupplier should
00822      *   support
00823      * @param proxy_id The ID assigned to the new proxy supplier
00824      * @return The new ProxySupplier
00825      * @throws AdminLimitExceeded if a limit in this admin is reached,
00826      *   such as the maximum number of proxies.
00827      */
00828     ProxySupplier obtain_notification_push_supplier (in ClientType ctype,
00829                                                      out ProxyID proxy_id)
00830       raises ( AdminLimitExceeded );
00831 
00832     /// Destroy the Admin
00833     void destroy();
00834   };
00835 
00836   /**
00837    * @interface SupplierAdmin
00838    *
00839    * @brief Interface used to control and obtain the proxies used by
00840    *   suppliers.
00841    */
00842   interface SupplierAdmin
00843     : CosNotification::QoSAdmin
00844     , CosNotifyComm::NotifyPublish
00845     , CosNotifyFilter::FilterAdmin
00846     , CosEventChannelAdmin::SupplierAdmin
00847   {
00848     /// The ID assigned to this admin by its event channel
00849     readonly attribute AdminID MyID;
00850 
00851     /// The event channel this admin belongs to
00852     readonly attribute EventChannel MyChannel;
00853 
00854     /// How are multiple filters interpreted
00855     readonly attribute InterFilterGroupOperator MyOperator;
00856 
00857     /// Get the complete list of pull proxy consumers
00858     readonly attribute ProxyIDSeq pull_consumers;
00859 
00860     /// Get the complete list of push proxy consumers
00861     readonly attribute ProxyIDSeq push_consumers;
00862 
00863     /// Get an specific ProxyConsumer
00864     /**
00865      * @param proxy_id The proxy ID that will be retrieved
00866      * @throws ProxyNotFound if the proxy_id is not found in this
00867      *   SupplierAdmin
00868      */
00869     ProxyConsumer get_proxy_consumer (in ProxyID proxy_id )
00870       raises ( ProxyNotFound );
00871 
00872     /// Create a new pull-style proxy consumer
00873     /**
00874      * @param ctype The event format that the ProxyConsumer should
00875      *   support
00876      * @param proxy_id The ID assigned to the new proxy consumer
00877      * @return The new ProxyConsumer
00878      * @throws AdminLimitExceeded if a limit in this admin is reached,
00879      *   such as the maximum number of proxies.
00880      */
00881     ProxyConsumer obtain_notification_pull_consumer (in ClientType ctype,
00882                                                      out ProxyID proxy_id)
00883       raises ( AdminLimitExceeded );
00884 
00885     /// Create a new push-style proxy consumer
00886     /**
00887      * @param ctype The event format that the ProxyConsumer should
00888      *   support
00889      * @param proxy_id The ID assigned to the new proxy consumer
00890      * @return The new ProxySupplier
00891      * @throws AdminLimitExceeded if a limit in this admin is reached,
00892      *   such as the maximum number of proxies.
00893      */
00894     ProxyConsumer obtain_notification_push_consumer (in ClientType ctype,
00895                                                      out ProxyID proxy_id)
00896       raises ( AdminLimitExceeded );
00897 
00898     /// Destroy the Admin
00899     void destroy();
00900   };
00901 
00902   /**
00903    * @interface EventChannel
00904    *
00905    * @brief Defines the interface to control an use an event channel
00906    */
00907   interface EventChannel
00908     : CosNotification::QoSAdmin
00909     , CosNotification::AdminPropertiesAdmin
00910     , CosEventChannelAdmin::EventChannel
00911   {
00912     /// The factory this event channel belongs to
00913     readonly attribute EventChannelFactory MyFactory;
00914 
00915     /// The default consumer admin
00916     readonly attribute ConsumerAdmin default_consumer_admin;
00917 
00918     /// The default supplier admin
00919     readonly attribute SupplierAdmin default_supplier_admin;
00920 
00921     /// The default filter factory for this event channel
00922     readonly attribute CosNotifyFilter::FilterFactory default_filter_factory;
00923 
00924     /// Create a new consumer admin
00925     /**
00926      * @param op Defines how multiple filters would be interpreted in
00927      *   the new consumer admin
00928      * @param id Returns the ID assigned to the new consumer admin
00929      * @return The new consumer admin
00930      */
00931     ConsumerAdmin new_for_consumers(in InterFilterGroupOperator op,
00932                                     out AdminID id );
00933 
00934     /// Create a new supplier admin
00935     /**
00936      * @param op Defines how multiple filters would be interpreted in
00937      *   the new supplier admin
00938      * @param id Returns the ID assigned to the new supplier admin
00939      * @return The new supplier admin
00940      */
00941     SupplierAdmin new_for_suppliers(in InterFilterGroupOperator op,
00942                                     out AdminID id );
00943 
00944     /// Fetch an specific consumer admin based on its ID
00945     /**
00946      * @param id The id of the consumer that should be returned
00947      * @return The consumer admin assigned the given ID
00948      * @throws AdminNotFound if there is no consumer admin with the ID
00949      *   provided
00950      */
00951     ConsumerAdmin get_consumeradmin ( in AdminID id )
00952       raises (AdminNotFound);
00953 
00954     /// Fetch an specific supplier admin based on its ID
00955     /**
00956      * @param id The id of the supplier that should be returned
00957      * @return The supplier admin assigned the given ID
00958      * @throws AdminNotFound if there is no supplier admin with the ID
00959      *   provided
00960      */
00961     SupplierAdmin get_supplieradmin ( in AdminID id )
00962       raises (AdminNotFound);
00963 
00964     /// Get the IDs of all the consumer admins
00965     AdminIDSeq get_all_consumeradmins();
00966 
00967     /// Get the IDs of all the supplier admins
00968     AdminIDSeq get_all_supplieradmins();
00969   };
00970 
00971   /// Each event channel is assigned a unique ID by its factory
00972   typedef long ChannelID;
00973 
00974   /// Helper type used to return the complete list of event channel
00975   /// IDs
00976   typedef sequence<ChannelID> ChannelIDSeq;
00977 
00978   /**
00979    * @exception ChannelNotFound
00980    *
00981    * @brief Exception raised if an specific ChannelID is not found.
00982    */
00983   exception ChannelNotFound {};
00984 
00985   /**
00986    * @interface EventChannelFactory
00987    *
00988    * @brief Defines the interface used to build event channels
00989    */
00990   interface EventChannelFactory {
00991     /// Create a new event channel
00992     /**
00993      * @param initial_qos Configure the initial QoS properties of the
00994      *   new EventChannel
00995      * @param initial_admin Configure the initial Admin properties of
00996      *   the new EventChannel
00997      * @param id Returns the ID assigned to the new EventChannel
00998      * @return The new event channel
00999      * @throws CosNotification::UnsupportedQoS if the requested QoS
01000      *   properties cannot be satisfied or are invalid
01001      * @throws CosNotification::UnsupportedAdmin if the requested
01002      *   admin properties cannot be satisfied or are invalid
01003      */
01004     EventChannel create_channel (in CosNotification::QoSProperties initial_qos,
01005                                  in CosNotification::AdminProperties initial_admin,
01006                                  out ChannelID id)
01007       raises(CosNotification::UnsupportedQoS,
01008              CosNotification::UnsupportedAdmin );
01009 
01010     /// Get the complete list of event channels in this factory
01011     ChannelIDSeq get_all_channels();
01012 
01013     /// Get an event channel given its ID
01014     /**
01015      * @param id The ID of the event channel the application wants
01016      * @return The event channel
01017      * @throws ChannelNotFound if the give ID is unknown on this
01018      *   factory
01019      */
01020     EventChannel get_event_channel ( in ChannelID id )
01021       raises (ChannelNotFound);
01022   };
01023 };
01024 
01025 #pragma prefix ""
01026 
01027 #endif /* _COS_NOTIFY_CHANNEL_ADMIN_IDL_ */

Generated on Thu Nov 9 13:24:09 2006 for TAO_CosNotification by doxygen 1.3.6