Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / orbsvcs / LoadBalancer / Push_Handler.h
blob056bb8eed415a0b90d481ddcc90f63c566799327
1 // -*- C++ -*-
3 //=======================================================================
4 /**
5 * @file Push_Handler.h
7 * @author Ossama Othman <ossama@uci.edu>
8 */
9 //=======================================================================
12 #ifndef TAO_LB_PUSH_HANDLER_H
13 #define TAO_LB_PUSH_HANDLER_H
15 #include /**/ "ace/pre.h"
17 #include "ace/config-all.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 # pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "orbsvcs/CosLoadBalancingC.h"
25 #include "ace/Event_Handler.h"
28 /**
29 * @class TAO_LB_Push_Handler
31 * @brief Event handler used when the "push" monitoring style is
32 * configured.
34 * An event handler designed to push loads to the LoadManager.
36 class TAO_LB_Push_Handler : public ACE_Event_Handler
38 public:
40 /// Constructor
41 TAO_LB_Push_Handler (CosLoadBalancing::LoadMonitor_ptr monitor,
42 const PortableGroup::Location & location,
43 CosLoadBalancing::LoadManager_ptr manager);
45 /// Receive the timeout event.
46 virtual int handle_timeout (const ACE_Time_Value &current_time,
47 const void *arg);
49 private:
51 /// Reference to the LoadMonitor.
52 CosLoadBalancing::LoadMonitor_var monitor_;
54 /// Location where the LoadMonitor resides.
55 const PortableGroup::Location location_;
57 /// Reference to the LoadManager.
58 CosLoadBalancing::LoadManager_var manager_;
62 #include /**/ "ace/post.h"
64 #endif /* TAO_LB_PUSH_HANDLER_H */