Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TAO_Notify_EVENT_MANAGER_H
00013 #define TAO_Notify_EVENT_MANAGER_H
00014
00015 #include "ace/pre.h"
00016 #include "ace/Auto_Ptr.h"
00017
00018 #include "orbsvcs/Notify/Refcountable.h"
00019
00020 #include "orbsvcs/Notify/notify_serv_export.h"
00021
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif
00025
00026 #include "tao/orbconf.h"
00027
00028 #include "ace/CORBA_macros.h"
00029
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031
00032 class TAO_Notify_ProxySupplier;
00033 class TAO_Notify_ProxyConsumer;
00034 class TAO_Notify_EventTypeSeq;
00035
00036 template <class PROXY, class ACE_LOCK>
00037 class TAO_Notify_Event_Map_T;
00038
00039 typedef TAO_Notify_Event_Map_T<TAO_Notify_ProxySupplier,
00040 TAO_SYNCH_RW_MUTEX>
00041 TAO_Notify_Consumer_Map;
00042
00043 typedef TAO_Notify_Event_Map_T<TAO_Notify_ProxyConsumer,
00044 TAO_SYNCH_RW_MUTEX>
00045 TAO_Notify_Supplier_Map;
00046
00047 namespace CORBA
00048 {
00049 class Environment;
00050 }
00051
00052
00053
00054
00055
00056
00057
00058 class TAO_Notify_Serv_Export TAO_Notify_Event_Manager : public TAO_Notify_Refcountable
00059 {
00060 public:
00061 typedef TAO_Notify_Refcountable_Guard_T< TAO_Notify_Event_Manager > Ptr;
00062
00063 TAO_Notify_Event_Manager (void);
00064
00065
00066 virtual ~TAO_Notify_Event_Manager ();
00067
00068 void release();
00069
00070
00071 void init (void);
00072
00073
00074 void shutdown (void);
00075
00076
00077 void connect (TAO_Notify_ProxySupplier* proxy_supplier);
00078
00079
00080 void disconnect (TAO_Notify_ProxySupplier* proxy_supplier);
00081
00082
00083 void connect (TAO_Notify_ProxyConsumer* proxy_consumer);
00084
00085
00086 void disconnect (TAO_Notify_ProxyConsumer* proxy_consumer);
00087
00088
00089 TAO_Notify_Consumer_Map& consumer_map (void);
00090 TAO_Notify_Supplier_Map& supplier_map (void);
00091
00092
00093 void offer_change (TAO_Notify_ProxyConsumer* proxy_consumer, const TAO_Notify_EventTypeSeq& added, const TAO_Notify_EventTypeSeq& removed);
00094
00095
00096 void subscription_change (TAO_Notify_ProxySupplier* proxy_supplier, const TAO_Notify_EventTypeSeq& added, const TAO_Notify_EventTypeSeq& removed);
00097
00098
00099 const TAO_Notify_EventTypeSeq& offered_types (void) const;
00100
00101
00102 const TAO_Notify_EventTypeSeq& subscription_types (void) const;
00103
00104 protected:
00105
00106 void subscribe (TAO_Notify_ProxySupplier* proxy_supplier, const TAO_Notify_EventTypeSeq& seq, TAO_Notify_EventTypeSeq& new_seq);
00107
00108
00109 void un_subscribe (TAO_Notify_ProxySupplier* proxy_supplier, const TAO_Notify_EventTypeSeq& seq, TAO_Notify_EventTypeSeq& last_seq);
00110
00111
00112 void publish (TAO_Notify_ProxyConsumer* proxy_consumer, const TAO_Notify_EventTypeSeq& seq, TAO_Notify_EventTypeSeq& new_seq);
00113
00114
00115 void un_publish (TAO_Notify_ProxyConsumer* proxy_consumer, const TAO_Notify_EventTypeSeq& seq, TAO_Notify_EventTypeSeq& last_seq);
00116
00117 private:
00118
00119
00120
00121
00122 TAO_Notify_Event_Manager (TAO_Notify_Event_Manager&);
00123 TAO_Notify_Event_Manager& operator= (TAO_Notify_Event_Manager&);
00124
00125
00126 ACE_Auto_Ptr< TAO_Notify_Consumer_Map > consumer_map_;
00127
00128
00129 ACE_Auto_Ptr< TAO_Notify_Supplier_Map > supplier_map_;
00130 };
00131
00132 TAO_END_VERSIONED_NAMESPACE_DECL
00133
00134 #include "ace/post.h"
00135
00136 #endif