CEC_Factory.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   CEC_Factory.h
00006  *
00007  *  $Id: CEC_Factory.h 73552 2006-07-16 23:30:42Z mitza $
00008  *
00009  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_CEC_FACTORY_H
00015 #define TAO_CEC_FACTORY_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "orbsvcs/CosEvent/event_serv_export.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #include "ace/Service_Object.h"
00026 
00027 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00028 #include "tao/AnyTypeCode/AnyTypeCode_methods.h"
00029 #endif
00030 
00031 #include "tao/Policy_ForwardC.h"
00032 #include "tao/Versioned_Namespace.h"
00033 
00034 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00035 class ACE_Lock;
00036 ACE_END_VERSIONED_NAMESPACE_DECL
00037 
00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00039 
00040 class TAO_CEC_EventChannel;
00041 
00042 class TAO_CEC_Dispatching;
00043 class TAO_CEC_Pulling_Strategy;
00044 class TAO_CEC_ConsumerAdmin;
00045 class TAO_CEC_SupplierAdmin;
00046 class TAO_CEC_ProxyPushConsumer;
00047 class TAO_CEC_ProxyPullConsumer;
00048 class TAO_CEC_ProxyPushSupplier;
00049 class TAO_CEC_ProxyPullSupplier;
00050 template<class PROXY> class TAO_ESF_Proxy_Collection;
00051 class TAO_CEC_ConsumerControl;
00052 class TAO_CEC_SupplierControl;
00053 
00054 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00055 class TAO_CEC_TypedEventChannel;
00056 class TAO_CEC_TypedProxyPushConsumer;
00057 class TAO_CEC_TypedConsumerAdmin;
00058 class TAO_CEC_TypedSupplierAdmin;
00059 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00060 
00061 typedef TAO_ESF_Proxy_Collection<TAO_CEC_ProxyPushConsumer> TAO_CEC_ProxyPushConsumer_Collection;
00062 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00063 typedef TAO_ESF_Proxy_Collection<TAO_CEC_TypedProxyPushConsumer> TAO_CEC_TypedProxyPushConsumer_Collection;
00064 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00065 typedef TAO_ESF_Proxy_Collection<TAO_CEC_ProxyPullConsumer> TAO_CEC_ProxyPullConsumer_Collection;
00066 typedef TAO_ESF_Proxy_Collection<TAO_CEC_ProxyPushSupplier> TAO_CEC_ProxyPushSupplier_Collection;
00067 typedef TAO_ESF_Proxy_Collection<TAO_CEC_ProxyPullSupplier> TAO_CEC_ProxyPullSupplier_Collection;
00068 
00069 /**
00070  * @class TAO_CEC_Factory
00071  *
00072  * @brief Abstract factory for the CosEventChannel components.
00073  *
00074  * The CosEventChannel implementation can be configured at
00075  * initialization time through several strategies and
00076  * components. This class defines the interface of an Abstract
00077  * Factory that creates all such components.
00078  * = MEMORY MANAGMENT
00079  * The objects it creates are owned by this class, the client must
00080  * invoke the corresponding destroy() method to release them.
00081  * Some implementations may require a different instance for the
00082  * CEC_Factory for each instance of a CEC_EventChannel.
00083  */
00084 class TAO_Event_Serv_Export TAO_CEC_Factory : public ACE_Service_Object
00085 {
00086 public:
00087   /// destructor...
00088   virtual ~TAO_CEC_Factory (void);
00089 
00090   /// Create and destroy the dispatching module.
00091   virtual TAO_CEC_Dispatching*
00092       create_dispatching (TAO_CEC_EventChannel*) = 0;
00093 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00094   virtual TAO_CEC_Dispatching*
00095       create_dispatching (TAO_CEC_TypedEventChannel*) = 0;
00096 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00097   virtual void
00098       destroy_dispatching (TAO_CEC_Dispatching*)  = 0;
00099 
00100   /// Create and destroy the pulling strategy.
00101   virtual TAO_CEC_Pulling_Strategy*
00102       create_pulling_strategy (TAO_CEC_EventChannel*) = 0;
00103   virtual void
00104       destroy_pulling_strategy (TAO_CEC_Pulling_Strategy*)  = 0;
00105 
00106   /// Create and destroy the consumer admin implementation.
00107   virtual TAO_CEC_ConsumerAdmin*
00108       create_consumer_admin (TAO_CEC_EventChannel*)  = 0;
00109   virtual void
00110       destroy_consumer_admin (TAO_CEC_ConsumerAdmin*) = 0;
00111 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00112   virtual TAO_CEC_TypedConsumerAdmin*
00113       create_consumer_admin (TAO_CEC_TypedEventChannel*)  = 0;
00114   virtual void
00115       destroy_consumer_admin (TAO_CEC_TypedConsumerAdmin*) = 0;
00116 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00117 
00118   /// Create and destroy the supplier admin implementation.
00119   virtual TAO_CEC_SupplierAdmin*
00120       create_supplier_admin (TAO_CEC_EventChannel*)  = 0;
00121   virtual void
00122       destroy_supplier_admin (TAO_CEC_SupplierAdmin*) = 0;
00123 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00124   virtual TAO_CEC_TypedSupplierAdmin*
00125       create_supplier_admin (TAO_CEC_TypedEventChannel*)  = 0;
00126   virtual void
00127       destroy_supplier_admin (TAO_CEC_TypedSupplierAdmin*) = 0;
00128 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00129 
00130   /// Create and destroy a ProxyPushSupplier
00131   virtual TAO_CEC_ProxyPushSupplier*
00132       create_proxy_push_supplier (TAO_CEC_EventChannel*) = 0;
00133 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00134   virtual TAO_CEC_ProxyPushSupplier*
00135       create_proxy_push_supplier (TAO_CEC_TypedEventChannel*) = 0;
00136 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00137   virtual void
00138       destroy_proxy_push_supplier (TAO_CEC_ProxyPushSupplier*) = 0;
00139 
00140   /// Create and destroy a ProxyPullSupplier
00141   virtual TAO_CEC_ProxyPullSupplier*
00142       create_proxy_pull_supplier (TAO_CEC_EventChannel*) = 0;
00143   virtual void
00144       destroy_proxy_pull_supplier (TAO_CEC_ProxyPullSupplier*) = 0;
00145 
00146   /// Create and destroy a ProxyPushConsumer
00147   virtual TAO_CEC_ProxyPushConsumer*
00148       create_proxy_push_consumer (TAO_CEC_EventChannel*) = 0;
00149   virtual void
00150       destroy_proxy_push_consumer (TAO_CEC_ProxyPushConsumer*) = 0;
00151 
00152 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00153   /// Create and destroy a TypedProxyPushConsumer
00154   virtual TAO_CEC_TypedProxyPushConsumer*
00155       create_proxy_push_consumer (TAO_CEC_TypedEventChannel*) = 0;
00156   virtual void
00157       destroy_proxy_push_consumer (TAO_CEC_TypedProxyPushConsumer*) = 0;
00158 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00159 
00160   /// Create and destroy a ProxyPullConsumer
00161   virtual TAO_CEC_ProxyPullConsumer*
00162       create_proxy_pull_consumer (TAO_CEC_EventChannel*) = 0;
00163   virtual void
00164       destroy_proxy_pull_consumer (TAO_CEC_ProxyPullConsumer*) = 0;
00165 
00166   /// Create and destroy a collection of TAO_CEC_ProxyPushConsumers
00167   virtual TAO_CEC_ProxyPushConsumer_Collection*
00168       create_proxy_push_consumer_collection (TAO_CEC_EventChannel*) = 0;
00169   virtual void
00170       destroy_proxy_push_consumer_collection (TAO_CEC_ProxyPushConsumer_Collection*) = 0;
00171 
00172 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00173   /// Create and destroy a collection of TAO_CEC_TypedProxyPushConsumers
00174   virtual TAO_CEC_TypedProxyPushConsumer_Collection*
00175       create_proxy_push_consumer_collection (TAO_CEC_TypedEventChannel*) = 0;
00176   virtual void
00177       destroy_proxy_push_consumer_collection (TAO_CEC_TypedProxyPushConsumer_Collection*) = 0;
00178 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00179 
00180   /// Create and destroy a collection of TAO_CEC_ProxyPullConsumers
00181   virtual TAO_CEC_ProxyPullConsumer_Collection*
00182       create_proxy_pull_consumer_collection (TAO_CEC_EventChannel*) = 0;
00183   virtual void
00184       destroy_proxy_pull_consumer_collection (TAO_CEC_ProxyPullConsumer_Collection*) = 0;
00185 
00186   /// Create and destroy a collection of TAO_CEC_ProxyPushSuppliers
00187   virtual TAO_CEC_ProxyPushSupplier_Collection*
00188       create_proxy_push_supplier_collection (TAO_CEC_EventChannel*) = 0;
00189 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00190   virtual TAO_CEC_ProxyPushSupplier_Collection*
00191       create_proxy_push_supplier_collection (TAO_CEC_TypedEventChannel*) = 0;
00192 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00193   virtual void
00194       destroy_proxy_push_supplier_collection (TAO_CEC_ProxyPushSupplier_Collection*) = 0;
00195 
00196   /// Create and destroy a collection of TAO_CEC_ProxyPullSuppliers
00197   virtual TAO_CEC_ProxyPullSupplier_Collection*
00198       create_proxy_pull_supplier_collection (TAO_CEC_EventChannel*) = 0;
00199   virtual void
00200       destroy_proxy_pull_supplier_collection (TAO_CEC_ProxyPullSupplier_Collection*) = 0;
00201 
00202   /// Create and destroy the locking strategies for both
00203   /// ProxyPushConsumers and ProxyPushSuppliers
00204   virtual ACE_Lock* create_consumer_lock (void) = 0;
00205   virtual void destroy_consumer_lock (ACE_Lock*) = 0;
00206   virtual ACE_Lock* create_supplier_lock (void) = 0;
00207   virtual void destroy_supplier_lock (ACE_Lock*) = 0;
00208 
00209   /// The ConsumerControl and SupplierControl strategies are used to
00210   /// discard non-existent consumers and suppliers
00211   virtual TAO_CEC_ConsumerControl*
00212       create_consumer_control (TAO_CEC_EventChannel*) = 0;
00213 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00214   virtual TAO_CEC_ConsumerControl*
00215       create_consumer_control (TAO_CEC_TypedEventChannel*) = 0;
00216 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00217   virtual void
00218       destroy_consumer_control (TAO_CEC_ConsumerControl*) = 0;
00219   virtual TAO_CEC_SupplierControl*
00220       create_supplier_control (TAO_CEC_EventChannel*) = 0;
00221 #if defined (TAO_HAS_TYPED_EVENT_CHANNEL)
00222   virtual TAO_CEC_SupplierControl*
00223       create_supplier_control (TAO_CEC_TypedEventChannel*) = 0;
00224 #endif /* TAO_HAS_TYPED_EVENT_CHANNEL */
00225   virtual void
00226       destroy_supplier_control (TAO_CEC_SupplierControl*) = 0;
00227 
00228   virtual CORBA::Policy_ptr
00229   create_roundtrip_timeout_policy (const ACE_Time_Value &timeout) = 0;
00230 };
00231 
00232 TAO_END_VERSIONED_NAMESPACE_DECL
00233 
00234 #include /**/ "ace/post.h"
00235 #endif /* TAO_CEC_FACTORY_H */

Generated on Tue Feb 2 17:44:51 2010 for TAO_CosEvent by  doxygen 1.4.7