CEC_SupplierAdmin.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   CEC_SupplierAdmin.h
00006  *
00007  *  CEC_SupplierAdmin.h,v 1.19 2006/03/15 07:52:21 jtc Exp
00008  *
00009  *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
00010  *
00011  * More details can be found in:
00012  *
00013  * http://doc.ece.uci.edu/~coryan/EC/
00014  */
00015 //=============================================================================
00016 
00017 #ifndef TAO_CEC_SUPPLIERADMIN_H
00018 #define TAO_CEC_SUPPLIERADMIN_H
00019 
00020 #include /**/ "ace/pre.h"
00021 
00022 #include "orbsvcs/CosEventChannelAdminS.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "orbsvcs/ESF/ESF_Proxy_Admin.h"
00029 
00030 #include "orbsvcs/CosEvent/CEC_ProxyPushConsumer.h"
00031 #include "orbsvcs/CosEvent/CEC_ProxyPullConsumer.h"
00032 #include "orbsvcs/CosEvent/event_serv_export.h"
00033 
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035 
00036 class TAO_CEC_EventChannel;
00037 
00038 /**
00039  * @class TAO_CEC_SupplierAdmin
00040  *
00041  * @brief ProxyPushSupplier
00042  *
00043  * Implement the CosEventChannelAdmin::SupplierAdmin interface.
00044  * This class is an Abstract Factory for the
00045  * TAO_CEC_ProxyPushConsumer.
00046  * = MEMORY MANAGMENT
00047  * It does not assume ownership of the TAO_CEC_EventChannel object
00048  * = LOCKING
00049  * @@ TODO
00050  * No provisions for locking, access must be serialized
00051  * externally.
00052  * = TODO
00053  */
00054 class TAO_Event_Serv_Export TAO_CEC_SupplierAdmin 
00055   : public POA_CosEventChannelAdmin::SupplierAdmin
00056 {
00057 public:
00058   /// constructor...
00059   TAO_CEC_SupplierAdmin (TAO_CEC_EventChannel* event_channel);
00060 
00061   /// destructor...
00062   virtual ~TAO_CEC_SupplierAdmin (void);
00063 
00064   /// For each elements call <worker->work()>.
00065   void for_each (TAO_ESF_Worker<TAO_CEC_ProxyPushConsumer> *worker
00066                  ACE_ENV_ARG_DECL);
00067 
00068   /// For each elements call <worker->work()>.
00069   void for_each (TAO_ESF_Worker<TAO_CEC_ProxyPullConsumer> *worker
00070                  ACE_ENV_ARG_DECL);
00071 
00072   /// Keep track of connected consumers.
00073   virtual void connected (TAO_CEC_ProxyPushConsumer*
00074                           ACE_ENV_ARG_DECL_NOT_USED);
00075   virtual void reconnected (TAO_CEC_ProxyPushConsumer*
00076                             ACE_ENV_ARG_DECL_NOT_USED);
00077   virtual void disconnected (TAO_CEC_ProxyPushConsumer*
00078                              ACE_ENV_ARG_DECL_NOT_USED);
00079   virtual void connected (TAO_CEC_ProxyPullConsumer*
00080                           ACE_ENV_ARG_DECL_NOT_USED);
00081   virtual void reconnected (TAO_CEC_ProxyPullConsumer*
00082                             ACE_ENV_ARG_DECL_NOT_USED);
00083   virtual void disconnected (TAO_CEC_ProxyPullConsumer*
00084                              ACE_ENV_ARG_DECL_NOT_USED);
00085 
00086   /// The event channel is shutting down, inform all the consumers of
00087   /// this
00088   virtual void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED);
00089 
00090   // = The CosEventChannelAdmin::SupplierAdmin methods...
00091   virtual CosEventChannelAdmin::ProxyPushConsumer_ptr
00092       obtain_push_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00093           ACE_THROW_SPEC ((CORBA::SystemException));
00094   virtual CosEventChannelAdmin::ProxyPullConsumer_ptr
00095       obtain_pull_consumer (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)
00096           ACE_THROW_SPEC ((CORBA::SystemException));
00097 
00098   // = The PortableServer::ServantBase methods
00099   virtual PortableServer::POA_ptr _default_POA (ACE_ENV_SINGLE_ARG_DECL);
00100 
00101 private:
00102   /// The Event Channel we belong to
00103   TAO_CEC_EventChannel *event_channel_;
00104 
00105   /// The push and pull aspects are implemented using these classes
00106   TAO_ESF_Proxy_Admin<TAO_CEC_EventChannel,
00107                       TAO_CEC_ProxyPushConsumer,
00108                       CosEventChannelAdmin::ProxyPushConsumer> 
00109     push_admin_;
00110   TAO_ESF_Proxy_Admin<TAO_CEC_EventChannel,
00111                       TAO_CEC_ProxyPullConsumer,
00112                       CosEventChannelAdmin::ProxyPullConsumer> 
00113     pull_admin_;
00114 
00115   /// Store the default POA.
00116   PortableServer::POA_var default_POA_;
00117 };
00118 
00119 TAO_END_VERSIONED_NAMESPACE_DECL
00120 
00121 #if defined (__ACE_INLINE__)
00122 #include "orbsvcs/CosEvent/CEC_SupplierAdmin.i"
00123 #endif /* __ACE_INLINE__ */
00124 
00125 #include /**/ "ace/post.h"
00126 
00127 #endif /* TAO_CEC_SUPPLIERADMIN_H */

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