Wait_On_Leader_Follower.cpp

Go to the documentation of this file.
00001 // Wait_On_Leader_Follower.cpp,v 1.24 2006/06/20 06:02:15 jwillemsen Exp
00002 
00003 #include "tao/Wait_On_Leader_Follower.h"
00004 #include "tao/LF_Follower.h"
00005 #include "tao/Leader_Follower.h"
00006 #include "tao/Transport.h"
00007 #include "tao/Synch_Reply_Dispatcher.h"
00008 #include "tao/ORB_Core.h"
00009 
00010 ACE_RCSID (tao,
00011            Wait_On_Leader_Follower,
00012            "Wait_On_Leader_Follower.cpp,v 1.24 2006/06/20 06:02:15 jwillemsen Exp")
00013 
00014 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00015 
00016 TAO_Wait_On_Leader_Follower::TAO_Wait_On_Leader_Follower (TAO_Transport *transport)
00017   : TAO_Wait_Strategy (transport)
00018 {
00019 }
00020 
00021 TAO_Wait_On_Leader_Follower::~TAO_Wait_On_Leader_Follower (void)
00022 {
00023 }
00024 
00025 int
00026 TAO_Wait_On_Leader_Follower::register_handler (void)
00027 {
00028   if (!this->is_registered_)
00029     {
00030       return this->transport_->register_handler ();
00031     }
00032 
00033   return 1;
00034 }
00035 
00036 bool
00037 TAO_Wait_On_Leader_Follower::non_blocking (void) const
00038 {
00039   return true;
00040 }
00041 
00042 int
00043 TAO_Wait_On_Leader_Follower::sending_request (TAO_ORB_Core *orb_core,
00044                                               int two_way)
00045 {
00046   // Register the handler.
00047   if (!this->is_registered_)
00048     {
00049       this->transport_->register_handler ();
00050     }
00051 
00052   // Send the request.
00053   return this->TAO_Wait_Strategy::sending_request (orb_core,
00054                                                    two_way);
00055 }
00056 
00057 int
00058 TAO_Wait_On_Leader_Follower::wait (ACE_Time_Value *max_wait_time,
00059                                    TAO_Synch_Reply_Dispatcher &rd)
00060 {
00061   TAO_Leader_Follower& leader_follower =
00062     this->transport_->orb_core ()->leader_follower ();
00063   return leader_follower.wait_for_event (&rd,
00064                                          this->transport_,
00065                                          max_wait_time);
00066 }
00067 
00068 bool
00069 TAO_Wait_On_Leader_Follower::can_process_upcalls (void) const
00070 {
00071   return true;
00072 }
00073 
00074 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Thu Nov 9 11:54:28 2006 for TAO by doxygen 1.3.6