00001 #include "tao/Connect_Strategy.h"
00002 #include "tao/Transport.h"
00003 #include "tao/Connection_Handler.h"
00004 #include "tao/LF_Multi_Event.h"
00005
00006 ACE_RCSID (tao,
00007 Connect_Strategy,
00008 "$Id: Connect_Strategy.cpp 77641 2007-03-09 13:01:34Z johnnyw $")
00009
00010 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00011
00012 TAO_Connect_Strategy::TAO_Connect_Strategy (TAO_ORB_Core *orb_core)
00013 : orb_core_ (orb_core)
00014 {
00015 }
00016
00017
00018 TAO_Connect_Strategy::~TAO_Connect_Strategy (void)
00019 {
00020 }
00021
00022 int
00023 TAO_Connect_Strategy::wait (TAO_Connection_Handler *ch,
00024 ACE_Time_Value *max_wait_time)
00025 {
00026 if (ch == 0)
00027 return -1;
00028
00029 return this->wait_i (ch, ch->transport (), max_wait_time);
00030 }
00031
00032 int
00033 TAO_Connect_Strategy::wait (TAO_Transport *t, ACE_Time_Value *max_wait_time)
00034 {
00035
00036
00037
00038 if (t == 0)
00039 return -1;
00040
00041 return this->wait_i (t->connection_handler (), t, max_wait_time);
00042 }
00043
00044 int
00045 TAO_Connect_Strategy::wait (TAO_LF_Multi_Event *mev,
00046 ACE_Time_Value *max_wait_time)
00047 {
00048 return this->wait_i (mev, mev->base_transport (), max_wait_time);
00049 }
00050
00051 int
00052 TAO_Connect_Strategy::poll (TAO_LF_Multi_Event *mev)
00053 {
00054 ACE_Time_Value zero (ACE_Time_Value::zero);
00055 return this->wait_i (mev, mev->base_transport (), &zero);
00056 }
00057
00058 TAO_END_VERSIONED_NAMESPACE_DECL