00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_CEC_PROXYPULLCONSUMER_H
00014 #define TAO_CEC_PROXYPULLCONSUMER_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "orbsvcs/CosEventChannelAdminS.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #include "orbsvcs/ESF/ESF_Worker.h"
00025 #include "orbsvcs/CosEvent/event_serv_export.h"
00026
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029 class TAO_CEC_EventChannel;
00030 class TAO_CEC_Dispatching;
00031 class TAO_CEC_ProxyPullSupplier;
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 class TAO_Event_Serv_Export TAO_CEC_ProxyPullConsumer : public POA_CosEventChannelAdmin::ProxyPullConsumer
00047 {
00048 public:
00049 typedef CosEventChannelAdmin::ProxyPullConsumer_ptr _ptr_type;
00050 typedef CosEventChannelAdmin::ProxyPullConsumer_var _var_type;
00051
00052
00053 TAO_CEC_ProxyPullConsumer (TAO_CEC_EventChannel* event_channel,
00054 const ACE_Time_Value &timeout);
00055
00056
00057 virtual ~TAO_CEC_ProxyPullConsumer (void);
00058
00059
00060 virtual void activate (
00061 CosEventChannelAdmin::ProxyPullConsumer_ptr &activated_proxy);
00062
00063
00064 virtual void deactivate (void);
00065
00066
00067 CORBA::Boolean is_connected (void) const;
00068
00069
00070
00071 CosEventComm::PullSupplier_ptr supplier (void) const;
00072
00073
00074 CORBA::Any* try_pull_from_supplier (CORBA::Boolean_out has_event);
00075 CORBA::Any* pull_from_supplier (void);
00076
00077
00078
00079
00080
00081
00082 CORBA::Boolean supplier_non_existent (CORBA::Boolean_out disconnected);
00083
00084
00085 virtual void shutdown (void);
00086
00087
00088 CORBA::ULong _incr_refcnt (void);
00089 CORBA::ULong _decr_refcnt (void);
00090
00091
00092 virtual void connect_pull_supplier (
00093 CosEventComm::PullSupplier_ptr pull_supplier);
00094 virtual void disconnect_pull_consumer (void);
00095
00096
00097 virtual PortableServer::POA_ptr _default_POA (void);
00098 virtual void _add_ref (void);
00099 virtual void _remove_ref (void);
00100
00101 protected:
00102
00103
00104 void supplier (CosEventComm::PullSupplier_ptr supplier);
00105 void supplier_i (CosEventComm::PullSupplier_ptr supplier);
00106
00107
00108 CORBA::Boolean is_connected_i (void) const;
00109
00110
00111 void cleanup_i (void);
00112
00113
00114
00115 CosEventComm::PullSupplier_ptr apply_policy
00116 (CosEventComm::PullSupplier_ptr s);
00117
00118 private:
00119
00120 TAO_CEC_EventChannel* event_channel_;
00121
00122 ACE_Time_Value timeout_;
00123
00124
00125 ACE_Lock* lock_;
00126
00127
00128 CORBA::ULong refcount_;
00129
00130
00131
00132 CosEventComm::PullSupplier_var supplier_;
00133
00134
00135 CosEventComm::PullSupplier_var nopolicy_supplier_;
00136
00137
00138 PortableServer::POA_var default_POA_;
00139 };
00140
00141 TAO_END_VERSIONED_NAMESPACE_DECL
00142
00143 #if defined (__ACE_INLINE__)
00144 #include "orbsvcs/CosEvent/CEC_ProxyPullConsumer.inl"
00145 #endif
00146
00147 #include "ace/post.h"
00148
00149 #endif