Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / FTRT_Event_Service / Event_Service / FT_EventService.h
blob381ab8de0d97cbddaee25263441c0c6a30545d77
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file FT_EventService.h
7 * @author Huang-Ming Huang <hh1@cse.wustl.edu>
8 */
9 //=============================================================================
10 #ifndef FT_EVENTSERVICE_H
11 #define FT_EVENTSERVICE_H
13 #include "orbsvcs/CosNamingC.h"
14 #include "orbsvcs/FtRtecEventChannelAdminC.h"
15 #include "orbsvcs/FtRtEvent/EventChannel/FTEC_Event_Channel.h"
16 #include "orbsvcs/FtRtEvent/EventChannel/FTEC_Become_Primary_Listener.h"
17 #include "TP_Task.h"
19 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
20 namespace POA_RtecScheduler
22 class Scheduler;
24 TAO_END_VERSIONED_NAMESPACE_DECL
26 class FT_EventService : private TAO_FTEC_Become_Primary_Listener
28 public:
29 FT_EventService();
30 ~FT_EventService();
32 int run(int argc, ACE_TCHAR* argv[]);
34 private:
35 int parse_args (int argc, ACE_TCHAR* argv []);
36 void setup_scheduler(CosNaming::NamingContext_ptr naming_context);
37 int report_factory(CORBA::ORB_ptr orb,
38 FtRtecEventChannelAdmin::EventChannel_ptr ec);
39 virtual void become_primary();
41 int global_scheduler_;
42 // Should we use a global scheduler or a local one?
43 POA_RtecScheduler::Scheduler *sched_impl_;
44 // The Scheduler implementation.
45 TAO_FTEC_Event_Channel::MEMBERSHIP membership_;
46 int num_threads_;
47 CORBA::ORB_var orb_;
48 TP_Task task_;
51 #endif