Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

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 Methods

 TAO_Connect_Strategy (TAO_ORB_Core *orb)
 Constructor. More...

virtual ~TAO_Connect_Strategy (void)
 Destructor. More...

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

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

virtual int post_failed_connect (TAO_Connection_Handler *ch, int is_finalized=1)
 Cleanup in case of failed connect. More...


Protected Attributes

TAO_ORB_Coreorb_core_
 Cached copy of the ORB core pointer. More...


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 44 of file Connect_Strategy.h.


Constructor & Destructor Documentation

TAO_Connect_Strategy::TAO_Connect_Strategy TAO_ORB_Core   orb
 

Constructor.

Definition at line 10 of file Connect_Strategy.cpp.

00011   : orb_core_ (orb_core)
00012 {
00013 }

TAO_Connect_Strategy::~TAO_Connect_Strategy void    [virtual]
 

Destructor.

Definition at line 16 of file Connect_Strategy.cpp.

00017 {
00018 }


Member Function Documentation

int TAO_Connect_Strategy::post_failed_connect TAO_Connection_Handler   ch,
int    is_finalized = 1
[virtual]
 

Cleanup in case of failed connect.

Definition at line 21 of file Connect_Strategy.cpp.

References TAO_Connection_Handler::decr_refcount, and TAO_Connection_Handler::transport.

Referenced by TAO_IIOP_Connector::make_connection.

00023 {
00024   int ref = 0;
00025   if (!is_finalized)
00026     {
00027       // We need to do this here else we will leak memory. We cannot call
00028       // close_connection () for the following reasons
00029       // . the event_handlers get_handle () will return an
00030       //   ACE_INVALID_HANDLE as things havent been shutdown
00031       //   properly.
00032       // . We cannot relax the conditions since the conditions are right
00033       //   for other natural cases ie. LF
00034       // Under these odd circumstances we need to take care of things
00035       // ourseleves
00036       ch->transport (0);
00037       ref =  ch->decr_refcount ();
00038     }
00039 
00040   return ref;
00041 }

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.

Referenced by TAO_IIOP_Connector::make_connection.

virtual int TAO_Connect_Strategy::wait TAO_Connection_Handler   ch,
ACE_Time_Value   val
[pure virtual]
 

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

Implemented in TAO_Blocked_Connect_Strategy.

Referenced by TAO_IIOP_Connector::make_connection.


Member Data Documentation

TAO_ORB_Core* TAO_Connect_Strategy::orb_core_ [protected]
 

Cached copy of the ORB core pointer.

Definition at line 81 of file Connect_Strategy.h.

Referenced by TAO_Reactive_Connect_Strategy::wait, and TAO_LF_Connect_Strategy::wait.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:11:43 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002