00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file CEC_TypedSupplierAdmin.h 00006 * 00007 * $Id: CEC_TypedSupplierAdmin.h 77001 2007-02-12 07:54:49Z johnnyw $ 00008 * 00009 * @author Jon Astle (jon@astle45.fsnet.co.uk) 00010 * 00011 * Based on the untyped version by Carlos O'Ryan (coryan@cs.wustl.edu) 00012 */ 00013 //============================================================================= 00014 00015 00016 #ifndef TAO_CEC_TYPEDSUPPLIERADMIN_H_ 00017 #define TAO_CEC_TYPEDSUPPLIERADMIN_H_ 00018 00019 #include /**/ "ace/pre.h" 00020 00021 #include "orbsvcs/CosTypedEventChannelAdminS.h" 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 #pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 #include "orbsvcs/ESF/ESF_Proxy_Admin.h" 00028 00029 #include "orbsvcs/CosEvent/CEC_TypedProxyPushConsumer.h" 00030 00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00032 00033 class TAO_CEC_TypedEventChannel; 00034 00035 //Class TAO_CEC_TypedSupplierAdmin 00036 class TAO_Event_Serv_Export TAO_CEC_TypedSupplierAdmin 00037 : public POA_CosTypedEventChannelAdmin::TypedSupplierAdmin 00038 { 00039 public: 00040 //Constructor 00041 TAO_CEC_TypedSupplierAdmin (TAO_CEC_TypedEventChannel* event_channel); 00042 00043 //Destructor 00044 virtual ~TAO_CEC_TypedSupplierAdmin (void); 00045 00046 /// For each elements call <worker->work()>. 00047 void for_each (TAO_ESF_Worker<TAO_CEC_TypedProxyPushConsumer> *worker); 00048 00049 /// Keep track of connected consumers. 00050 virtual void connected (TAO_CEC_TypedProxyPushConsumer*); 00051 virtual void reconnected (TAO_CEC_TypedProxyPushConsumer*); 00052 virtual void disconnected (TAO_CEC_TypedProxyPushConsumer*); 00053 00054 /// The typed event channel is shutting down, inform all the consumers of 00055 /// this 00056 virtual void shutdown (void); 00057 00058 // = The CosTypedEventChannelAdmin::TypedSupplierAdmin methods... 00059 virtual CosTypedEventChannelAdmin::TypedProxyPushConsumer_ptr 00060 obtain_typed_push_consumer (const char * supported_interface); 00061 00062 virtual CosEventChannelAdmin::ProxyPullConsumer_ptr 00063 obtain_typed_pull_consumer (const char * uses_interface); 00064 00065 // = The CosEventChannelAdmin::SupplierAdmin methods... 00066 virtual CosEventChannelAdmin::ProxyPushConsumer_ptr 00067 obtain_push_consumer (void); 00068 00069 virtual CosEventChannelAdmin::ProxyPullConsumer_ptr 00070 obtain_pull_consumer (void); 00071 00072 // = The PortableServer::ServantBase methods 00073 virtual PortableServer::POA_ptr _default_POA (void); 00074 00075 private: 00076 /// The Event Channel we belong to 00077 TAO_CEC_TypedEventChannel *typed_event_channel_; 00078 00079 /// Store the default POA. 00080 PortableServer::POA_var default_POA_; 00081 00082 /// The push and pull aspects are implemented using these classes 00083 TAO_ESF_Proxy_Admin<TAO_CEC_TypedEventChannel, 00084 TAO_CEC_TypedProxyPushConsumer, 00085 CosTypedEventChannelAdmin::TypedProxyPushConsumer> 00086 typed_push_admin_; 00087 }; 00088 00089 TAO_END_VERSIONED_NAMESPACE_DECL 00090 00091 #if defined (__ACE_INLINE__) 00092 #include "orbsvcs/CosEvent/CEC_TypedSupplierAdmin.inl" 00093 #endif /* __ACE_INLINE__ */ 00094 00095 #include /**/ "ace/post.h" 00096 00097 #endif /* TAO_CEC_TYPEDSUPPLIERADMIN_H_ */