TAO_Connect_Strategy Class Reference

Define the interface for the connect strategy, i.e. the algorithm that controls how does the ORB establishes remote connections. More...

#include <Connect_Strategy.h>

Inheritance diagram for TAO_Connect_Strategy:

Inheritance graph
[legend]
Collaboration diagram for TAO_Connect_Strategy:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Connect_Strategy (TAO_ORB_Core *orb)
 Constructor.

virtual ~TAO_Connect_Strategy (void)
 Destructor.

virtual void synch_options (ACE_Time_Value *val, ACE_Synch_Options &opt)=0
 Obtain the synch options that can be passed to ACE_Connector.

int wait (TAO_Connection_Handler *ch, ACE_Time_Value *val)
 Wait for the connection to be completed till a timeout occurs.

int wait (TAO_Transport *t, ACE_Time_Value *val)
int wait (TAO_LF_Multi_Event *ev, ACE_Time_Value *val)
int poll (TAO_LF_Multi_Event *ev)

Protected Member Functions

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


Protected Attributes

TAO_ORB_Core *const  orb_core_
 Cached copy of the ORB core pointer.


Detailed Description

Define the interface for the connect strategy, i.e. the algorithm that controls how does the ORB establishes remote connections.

The thread that establishes remote connections can either make a blocking or a non-blocking connect. The strategy to wait for the connection completion can also be different.

This strategy controls how does the ORB schedules and waits for connection completion.

Definition at line 55 of file Connect_Strategy.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_Connect_Strategy::TAO_Connect_Strategy TAO_ORB_Core orb  ) 
 

Constructor.

Definition at line 12 of file Connect_Strategy.cpp.

00013   : orb_core_ (orb_core)
00014 {
00015 }

TAO_Connect_Strategy::~TAO_Connect_Strategy void   )  [virtual]
 

Destructor.

Definition at line 18 of file Connect_Strategy.cpp.

00019 {
00020 }


Member Function Documentation

int TAO_Connect_Strategy::poll TAO_LF_Multi_Event ev  ) 
 

Do a quick check to see if any connections are complete. This does the same as the wait with an explicit time value of 0.

Definition at line 53 of file Connect_Strategy.cpp.

References TAO_LF_Multi_Event::base_transport(), and wait_i().

Referenced by TAO_IIOP_Connector::make_parallel_connection().

00054 {
00055   ACE_Time_Value zero(ACE_Time_Value::zero);
00056   return this->wait_i (mev, mev->base_transport(), &zero);
00057 }

virtual void TAO_Connect_Strategy::synch_options ACE_Time_Value val,
ACE_Synch_Options opt
[pure virtual]
 

Obtain the synch options that can be passed to ACE_Connector.

Implemented in TAO_Blocked_Connect_Strategy, TAO_LF_Connect_Strategy, and TAO_Reactive_Connect_Strategy.

Referenced by TAO_IIOP_Connector::begin_connection().

int TAO_Connect_Strategy::wait TAO_LF_Multi_Event ev,
ACE_Time_Value val
 

Wait for one of many connections to complete. Returns when one succeeds or all fail.

Definition at line 46 of file Connect_Strategy.cpp.

References TAO_LF_Multi_Event::base_transport(), and wait_i().

00048 {
00049   return this->wait_i (mev, mev->base_transport(), max_wait_time);
00050 }

int TAO_Connect_Strategy::wait TAO_Transport t,
ACE_Time_Value val
 

Definition at line 33 of file Connect_Strategy.cpp.

References TAO_Transport::connection_handler(), and wait_i().

00035 {
00036   // Basically the connection was EINPROGRESS, but before we could
00037   // wait for it some other thread detected a failure and cleaned up
00038   // the connection handler.
00039   if (t == 0)
00040     return -1;
00041 
00042   return this->wait_i (t->connection_handler(),t,max_wait_time);
00043 }

int TAO_Connect_Strategy::wait TAO_Connection_Handler ch,
ACE_Time_Value val
 

Wait for the connection to be completed till a timeout occurs.

Definition at line 23 of file Connect_Strategy.cpp.

References TAO_Connection_Handler::transport(), and wait_i().

Referenced by TAO_Connector::wait_for_connection_completion().

00025 {
00026   if (ch == 0)
00027     return -1;
00028 
00029   return this->wait_i (ch, ch->transport (),max_wait_time);
00030 }

virtual int TAO_Connect_Strategy::wait_i TAO_LF_Event ev,
TAO_Transport t,
ACE_Time_Value val
[protected, pure virtual]
 

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

Implemented in TAO_Blocked_Connect_Strategy, TAO_LF_Connect_Strategy, and TAO_Reactive_Connect_Strategy.

Referenced by poll(), and wait().


Member Data Documentation

TAO_ORB_Core* const TAO_Connect_Strategy::orb_core_ [protected]
 

Cached copy of the ORB core pointer.

Definition at line 96 of file Connect_Strategy.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:12:51 2006 for TAO by doxygen 1.3.6