TAO_LF_Connect_Strategy Class Reference

Concrete implementation of a connect strategy that waits on the leader-follower during asynch connects. More...

#include <LF_Connect_Strategy.h>

Inheritance diagram for TAO_LF_Connect_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_LF_Connect_Strategy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_LF_Connect_Strategy (TAO_ORB_Core *orb)
 Constructor.
 ~TAO_LF_Connect_Strategy (void)
 Destructor.
virtual void synch_options (ACE_Time_Value *val, ACE_Synch_Options &opt)
 Obtain the synch options that can be passed to ACE_Connector.

Protected Member Functions

virtual int wait_i (TAO_LF_Event *ev, TAO_Transport *t, ACE_Time_Value *val)
 This is the method that does all the real interesting stuff.

Detailed Description

Concrete implementation of a connect strategy that waits on the leader-follower during asynch connects.

Definition at line 40 of file LF_Connect_Strategy.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_LF_Connect_Strategy::TAO_LF_Connect_Strategy ( TAO_ORB_Core orb  ) 

Constructor.

Definition at line 17 of file LF_Connect_Strategy.cpp.

00019   : TAO_Connect_Strategy (orb_core)
00020 {
00021 }

TAO_LF_Connect_Strategy::~TAO_LF_Connect_Strategy ( void   ) 

Destructor.

Definition at line 23 of file LF_Connect_Strategy.cpp.

00024 {
00025 }


Member Function Documentation

void TAO_LF_Connect_Strategy::synch_options ( ACE_Time_Value val,
ACE_Synch_Options opt 
) [virtual]

Obtain the synch options that can be passed to ACE_Connector.

Implements TAO_Connect_Strategy.

Definition at line 28 of file LF_Connect_Strategy.cpp.

References ACE_Synch_Options::set(), ACE_Synch_Options::USE_REACTOR, and ACE_Time_Value::zero.

00030 {
00031   if (timeout != 0)
00032     {
00033       options.set (ACE_Synch_Options::USE_REACTOR, *timeout);
00034     }
00035   else
00036     {
00037       // Making it sure it is blocking.
00038       options.set (ACE_Synch_Options::USE_REACTOR, ACE_Time_Value::zero);
00039     }
00040 }

int TAO_LF_Connect_Strategy::wait_i ( TAO_LF_Event ev,
TAO_Transport t,
ACE_Time_Value val 
) [protected, virtual]

This is the method that does all the real interesting stuff.

Implements TAO_Connect_Strategy.

Definition at line 43 of file LF_Connect_Strategy.cpp.

References TAO_LF_Event::error_detected(), TAO_ORB_Core::leader_follower(), TAO_Connect_Strategy::orb_core_, and TAO_Leader_Follower::wait_for_event().

00046 {
00047   if (transport == 0)
00048     return -1;
00049 
00050   TAO_Leader_Follower &leader_follower =
00051     this->orb_core_->leader_follower ();
00052 
00053   int result =
00054     leader_follower.wait_for_event (ev, transport, max_wait_time);
00055 
00056   if (ev->error_detected () && result != -1)
00057     result = -1;
00058 
00059   return result;
00060 }


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:39:35 2010 for TAO by  doxygen 1.4.7