1 #ifndef LONGUPCALLS_AMI_MANAGER_H
2 #define LONGUPCALLS_AMI_MANAGER_H
8 : public virtual POA_Test::Manager
11 AMI_Manager (CORBA::ORB_ptr orb
);
14 // = The skeleton methods
15 virtual void start_workers (CORBA::Short worker_count
,
16 CORBA::Long milliseconds
,
17 Test::Controller_ptr controller
);
18 virtual void shutdown ();
22 // The ORB, to shutdown
25 // ****************************************************************
27 class Worker
: public ACE_Task_Base
30 Worker (ACE_Thread_Manager
*thr_mgr
,
31 Test::Controller_ptr controller
,
32 CORBA::Long milliseconds
,
39 Test::Controller_var controller_
;
40 // The controller pointer
42 CORBA::Long milliseconds_
;
43 // The number of milliseconds.
49 // ****************************************************************
51 class Controller_Handler
52 : public virtual POA_Test::AMI_ControllerHandler
55 Controller_Handler (TAO_SYNCH_MUTEX
*mutex
,
56 int *pending_replies
);
59 virtual void worker_started ();
60 virtual void worker_started_excep (::Messaging::ExceptionHolder
*);
61 virtual void worker_finished ();
62 virtual void worker_finished_excep (::Messaging::ExceptionHolder
*);
65 TAO_SYNCH_MUTEX
*mutex_
;
66 int *pending_replies_
;
67 // The pending replies is decremented each time a reply is
69 // The mutex is used to protect the access to the flag.
72 #endif /* LONGUPCALLS_AMI_MANAGER_H */