00001 // -*- C++ -*- 00002 /** 00003 * @file EC_RTCORBA_Dispatching.h 00004 * 00005 * EC_RTCORBA_Dispatching.h,v 1.8 2006/03/14 06:14:25 jtc Exp 00006 * 00007 * @author Carlos O'Ryan (coryan@cs.wustl.edu) 00008 * 00009 * Based on previous work by Tim Harrison (harrison@cs.wustl.edu) and 00010 * other members of the DOC group. More details can be found in: 00011 * 00012 * http://doc.ece.uci.edu/~coryan/EC/index.html 00013 */ 00014 00015 #ifndef TAO_EC_RTCORBA_DISPATCHING_H 00016 #define TAO_EC_RTCORBA_DISPATCHING_H 00017 #include /**/ "ace/pre.h" 00018 00019 #include "orbsvcs/Event/rtcorba_event_export.h" 00020 #include "orbsvcs/Event/EC_Dispatching.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 #include "orbsvcs/Event/EC_Dispatching_Task.h" 00027 #include "tao/RTCORBA/RTCORBA.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 /** 00032 * @class TAO_EC_RTCORBA_Dispatching 00033 * 00034 * @brief RTCORBA-based dispatching strategy 00035 * 00036 */ 00037 class TAO_RTCORBAEvent_Export TAO_EC_RTCORBA_Dispatching : public TAO_EC_Dispatching 00038 { 00039 public: 00040 /// Constructor 00041 TAO_EC_RTCORBA_Dispatching (const RTCORBA::ThreadpoolLanes &lanes, 00042 RTCORBA::PriorityMapping *mapping, 00043 RTCORBA::Current_ptr current); 00044 00045 /// Destructor 00046 ~TAO_EC_RTCORBA_Dispatching (void); 00047 00048 // = The EC_Dispatching methods. 00049 virtual void activate (void); 00050 virtual void shutdown (void); 00051 virtual void push (TAO_EC_ProxyPushSupplier* proxy, 00052 RtecEventComm::PushConsumer_ptr consumer, 00053 const RtecEventComm::EventSet& event, 00054 TAO_EC_QOS_Info& qos_info 00055 ACE_ENV_ARG_DECL); 00056 virtual void push_nocopy (TAO_EC_ProxyPushSupplier* proxy, 00057 RtecEventComm::PushConsumer_ptr consumer, 00058 RtecEventComm::EventSet& event, 00059 TAO_EC_QOS_Info& qos_info 00060 ACE_ENV_ARG_DECL); 00061 00062 private: 00063 /// The thread pools... 00064 RTCORBA::ThreadpoolLanes lanes_; 00065 00066 /// Used to map between CORBA and native priorities 00067 RTCORBA::PriorityMapping *priority_mapping_; 00068 00069 /// Used to get the current RTCORBA priority 00070 RTCORBA::Current_var current_; 00071 00072 /// Use our own thread manager. 00073 ACE_Thread_Manager thread_manager_; 00074 00075 /// The dispatching task(s), one per lane 00076 TAO_EC_Dispatching_Task *tasks_; 00077 }; 00078 00079 TAO_END_VERSIONED_NAMESPACE_DECL 00080 00081 #include /**/ "ace/post.h" 00082 #endif /* TAO_EC_RTCORBA_DISPATCHING_H */