00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TAO_Notify_EVENTCHANNEL_H
00013 #define TAO_Notify_EVENTCHANNEL_H
00014
00015 #include "ace/pre.h"
00016
00017 #include "orbsvcs/Notify/notify_serv_export.h"
00018
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif
00022
00023 #include "orbsvcs/CosNotifyChannelAdminS.h"
00024 #include "orbsvcs/Notify/Topology_Object.h"
00025 #include "orbsvcs/Notify/Object.h"
00026 #include "orbsvcs/Notify/EventChannelFactory.h"
00027
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029
00030 class TAO_Notify_ConsumerAdmin;
00031 class TAO_Notify_SupplierAdmin;
00032 class TAO_Notify_EventChannelFactory;
00033 class TAO_Notify_ProxyConsumer;
00034 class TAO_Notify_ProxySupplier;
00035 template <class TYPE> class TAO_Notify_Container_T;
00036
00037 #if defined(_MSC_VER)
00038 #pragma warning(push)
00039 #pragma warning(disable:4250)
00040 #endif
00041
00042
00043
00044
00045
00046
00047
00048 class TAO_Notify_Serv_Export TAO_Notify_EventChannel
00049 : public virtual POA_CosNotifyChannelAdmin::EventChannel,
00050 public TAO_Notify::Topology_Parent
00051 {
00052 friend class TAO_Notify_Builder;
00053
00054 public:
00055 typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_EventChannel > Ptr;
00056 typedef CosNotifyChannelAdmin::ChannelIDSeq SEQ;
00057 typedef CosNotifyChannelAdmin::ChannelIDSeq_var SEQ_VAR;
00058
00059
00060 TAO_Notify_EventChannel (void);
00061
00062
00063 virtual ~TAO_Notify_EventChannel ();
00064
00065
00066 void init (TAO_Notify_EventChannelFactory* ecf
00067 , const CosNotification::QoSProperties & initial_qos
00068 , const CosNotification::AdminProperties & initial_admin);
00069
00070
00071 void init (TAO_Notify::Topology_Parent * parent);
00072
00073
00074 void remove (TAO_Notify_ConsumerAdmin* consumer_admin);
00075
00076
00077 void remove (TAO_Notify_SupplierAdmin* supplier_admin);
00078
00079
00080 virtual void _add_ref (void);
00081 virtual void _remove_ref (void);
00082
00083
00084
00085 virtual void save_persistent (TAO_Notify::Topology_Saver& saver);
00086 virtual TAO_Notify::Topology_Object* load_child (const ACE_CString &type,
00087 CORBA::Long id,
00088 const TAO_Notify::NVPList& attrs);
00089 virtual void reconnect (void);
00090
00091 virtual TAO_Notify_Object::ID get_id () const {return id();}
00092
00093 TAO_Notify_ProxyConsumer * find_proxy_consumer (TAO_Notify::IdVec & id_path, size_t position);
00094 TAO_Notify_ProxySupplier * find_proxy_supplier (TAO_Notify::IdVec & id_path, size_t position);
00095
00096
00097 virtual int shutdown (void);
00098 virtual void load_attrs(const TAO_Notify::NVPList& attrs);
00099
00100
00101 virtual void destroy (void);
00102
00103 private:
00104 typedef TAO_Notify_Container_T <TAO_Notify_ConsumerAdmin> TAO_Notify_ConsumerAdmin_Container;
00105 typedef TAO_Notify_Container_T <TAO_Notify_SupplierAdmin> TAO_Notify_SupplierAdmin_Container;
00106
00107 virtual void save_attrs(TAO_Notify::NVPList& attrs);
00108
00109
00110
00111 TAO_Notify_EventChannelFactory::Ptr ecf_;
00112
00113 TAO_SYNCH_MUTEX default_admin_mutex_;
00114
00115
00116 CosNotifyChannelAdmin::ConsumerAdmin_var default_consumer_admin_;
00117
00118
00119 CosNotifyChannelAdmin::SupplierAdmin_var default_supplier_admin_;
00120
00121 protected:
00122
00123
00124 virtual ::CosNotifyChannelAdmin::EventChannelFactory_ptr MyFactory (
00125 );
00126
00127 virtual ::CosNotifyChannelAdmin::ConsumerAdmin_ptr default_consumer_admin (
00128
00129 );
00130
00131 virtual ::CosNotifyChannelAdmin::SupplierAdmin_ptr default_supplier_admin (
00132
00133 );
00134
00135 virtual ::CosNotifyFilter::FilterFactory_ptr default_filter_factory (void);
00136
00137 virtual ::CosNotifyChannelAdmin::ConsumerAdmin_ptr new_for_consumers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
00138 CosNotifyChannelAdmin::AdminID_out id);
00139
00140 virtual ::CosNotifyChannelAdmin::SupplierAdmin_ptr new_for_suppliers (CosNotifyChannelAdmin::InterFilterGroupOperator op,
00141 CosNotifyChannelAdmin::AdminID_out id);
00142
00143 virtual ::CosNotifyChannelAdmin::ConsumerAdmin_ptr get_consumeradmin (CosNotifyChannelAdmin::AdminID id);
00144
00145 virtual ::CosNotifyChannelAdmin::SupplierAdmin_ptr get_supplieradmin (CosNotifyChannelAdmin::AdminID id);
00146
00147 virtual ::CosNotifyChannelAdmin::AdminIDSeq * get_all_consumeradmins (void);
00148
00149 virtual ::CosNotifyChannelAdmin::AdminIDSeq * get_all_supplieradmins (void);
00150
00151 virtual ::CosNotification::QoSProperties * get_qos (void);
00152
00153 virtual void set_qos (const CosNotification::QoSProperties & qos);
00154
00155 virtual void validate_qos (const CosNotification::QoSProperties & required_qos,
00156 CosNotification::NamedPropertyRangeSeq_out available_qos);
00157
00158 virtual ::CosNotification::AdminProperties * get_admin (void);
00159
00160 virtual void set_admin (const CosNotification::AdminProperties & admin);
00161
00162 virtual ::CosEventChannelAdmin::ConsumerAdmin_ptr for_consumers (void);
00163
00164 virtual ::CosEventChannelAdmin::SupplierAdmin_ptr for_suppliers (void);
00165
00166 private:
00167 TAO_Notify_ConsumerAdmin_Container& ca_container();
00168 TAO_Notify_SupplierAdmin_Container& sa_container();
00169
00170
00171 ACE_Auto_Ptr< TAO_Notify_ConsumerAdmin_Container > ca_container_;
00172
00173
00174 ACE_Auto_Ptr< TAO_Notify_SupplierAdmin_Container > sa_container_;
00175
00176
00177 virtual void release (void);
00178 };
00179
00180 TAO_END_VERSIONED_NAMESPACE_DECL
00181
00182 #if defined(_MSC_VER)
00183 #pragma warning(pop)
00184 #endif
00185
00186 #include "ace/post.h"
00187
00188 #endif