00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef TAO_EC_TPC_DISPATCHING_H
00013 #define TAO_EC_TPC_DISPATCHING_H
00014 #include "ace/pre.h"
00015
00016 #include "ace/Hash_Map_Manager_T.h"
00017 #include "ace/Null_Mutex.h"
00018
00019 #include "orbsvcs/Event/EC_Dispatching.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #include "orbsvcs/Event/EC_TPC_Dispatching_Task.h"
00026
00027 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00028
00029 class TAO_EC_Event_Channel_Base;
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class TAO_RTEvent_Serv_Export TAO_EC_TPC_Dispatching : public TAO_EC_Dispatching
00040 {
00041 public:
00042 TAO_EC_TPC_Dispatching (TAO_EC_Queue_Full_Service_Object* so);
00043 ~TAO_EC_TPC_Dispatching ();
00044
00045
00046 virtual void activate (void);
00047 virtual void shutdown (void);
00048 virtual void push (TAO_EC_ProxyPushSupplier* proxy,
00049 RtecEventComm::PushConsumer_ptr consumer,
00050 const RtecEventComm::EventSet& event,
00051 TAO_EC_QOS_Info& qos_info
00052 ACE_ENV_ARG_DECL);
00053 virtual void push_nocopy (TAO_EC_ProxyPushSupplier* proxy,
00054 RtecEventComm::PushConsumer_ptr consumer,
00055 RtecEventComm::EventSet& event,
00056 TAO_EC_QOS_Info& qos_info
00057 ACE_ENV_ARG_DECL);
00058
00059 int add_consumer (RtecEventComm::PushConsumer_ptr consumer ACE_ENV_ARG_DECL);
00060 int remove_consumer (RtecEventComm::PushConsumer_ptr consumer ACE_ENV_ARG_DECL);
00061
00062 private:
00063
00064 ACE_Thread_Manager thread_manager_;
00065
00066 typedef ACE_Hash_Map_Manager_Ex<RtecEventComm::PushConsumer_ptr,TAO_EC_Dispatching_Task*,ACE_Pointer_Hash<RtecEventComm::PushConsumer_ptr>,ACE_Equal_To<RtecEventComm::PushConsumer_ptr>,ACE_Null_Mutex> MAPTYPE;
00067
00068
00069
00070 MAPTYPE consumer_task_map_;
00071
00072
00073
00074
00075 ACE_SYNCH_MUTEX lock_;
00076
00077
00078 TAO_EC_Queue_Full_Service_Object* queue_full_service_object_;
00079
00080 };
00081
00082 TAO_END_VERSIONED_NAMESPACE_DECL
00083
00084 #include "ace/post.h"
00085 #endif