Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / Wait_On_Leader_Follower.cpp
blob348bf3b307fa1dd7cf0f7f033cf27c84c3c787be
1 #include "tao/Wait_On_Leader_Follower.h"
2 #include "tao/LF_Follower.h"
3 #include "tao/Leader_Follower.h"
4 #include "tao/Transport.h"
5 #include "tao/Synch_Reply_Dispatcher.h"
6 #include "tao/ORB_Core.h"
8 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
10 TAO_Wait_On_Leader_Follower::TAO_Wait_On_Leader_Follower
11 (TAO_Transport *transport)
12 : TAO_Wait_Strategy (transport)
16 int
17 TAO_Wait_On_Leader_Follower::register_handler ()
19 if (!this->is_registered_)
21 return this->transport_->register_handler ();
24 return 1;
27 bool
28 TAO_Wait_On_Leader_Follower::non_blocking () const
30 return true;
33 int
34 TAO_Wait_On_Leader_Follower::sending_request (TAO_ORB_Core *orb_core,
35 TAO_Message_Semantics msg_semantics)
37 // Register the handler.
38 if (!this->is_registered_)
40 this->transport_->register_handler ();
43 return this->TAO_Wait_Strategy::sending_request (orb_core, msg_semantics);
46 int
47 TAO_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time,
48 TAO_Synch_Reply_Dispatcher &rd)
50 TAO_Leader_Follower &leader_follower =
51 this->transport_->orb_core ()->leader_follower ();
52 return leader_follower.wait_for_event (&rd, this->transport_, max_wait_time);
55 bool
56 TAO_Wait_On_Leader_Follower::can_process_upcalls () const
58 return true;
61 TAO_END_VERSIONED_NAMESPACE_DECL