Optimized_Connection_Endpoint_Selector.h

Go to the documentation of this file.
00001 // This may look like C, but it's really -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Optimized_Connection_Endpoint_Selector.h
00006  *
00007  *  Optimized_Connection_Endpoint_Selector.h,v 1.2 2006/03/10 07:19:18 jtc Exp
00008  *
00009  * Strategies for selecting profile/endpoint from an IOR for making an
00010  * invocation.
00011  *
00012  *  @author Phil Mesnier <mesnier_p@ociweb.com>
00013  */
00014 //=============================================================================
00015 
00016 
00017 #ifndef TAO_OPTIMIZED_CONNECTION_ENDPOINT_SELECTOR_H
00018 #define TAO_OPTIMIZED_ENDPOINT_SELECTOR_H
00019 
00020 #include /**/ "ace/pre.h"
00021 
00022 #include "tao/corbafwd.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "tao/Strategies/strategies_export.h"
00029 
00030 #include "tao/Invocation_Endpoint_Selectors.h"
00031 #include "ace/Time_Value.h"
00032 
00033 
00034 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00035 
00036 class TAO_GIOP_Invocation;
00037 class TAO_ORB_Core;
00038 class TAO_Stub;
00039 class TAO_Profile;
00040 
00041 /**
00042  * @class TAO_Optimized_Connection_Endpoint_Selector
00043  *
00044  * @brief More efficient connection strategy for endpoint selection.
00045  *
00046  * This strategy builds on the default by first querying the connection
00047  * cache for all potential endpoints before iterating over the list to
00048  * attempt to create new connections.
00049  */
00050 
00051 class TAO_Strategies_Export TAO_Optimized_Connection_Endpoint_Selector :
00052 public TAO_Default_Endpoint_Selector
00053 {
00054 public:
00055   /// Constructor.
00056   TAO_Optimized_Connection_Endpoint_Selector (const ACE_Time_Value& tv);
00057 
00058   /// Destructor.
00059   virtual ~TAO_Optimized_Connection_Endpoint_Selector (void);
00060 
00061   static void hook (TAO_ORB_Core *,
00062                     TAO_Stub *,
00063                     bool &has_timeout,
00064                     ACE_Time_Value &tv);
00065 
00066   virtual void select_endpoint (TAO::Profile_Transport_Resolver *,
00067                                 ACE_Time_Value *max_wait_time
00068                                 ACE_ENV_ARG_DECL);
00069 private:
00070 
00071   int check_profile (TAO_Profile *,
00072                      TAO::Profile_Transport_Resolver *);
00073 
00074   static ACE_Time_Value timeout_;
00075 };
00076 
00077 TAO_END_VERSIONED_NAMESPACE_DECL
00078 
00079 #include /**/ "ace/post.h"
00080 #endif  /* TAO_OPTIMIZED_CONNECTION_ENDPOINT_SELECTOR_H */

Generated on Thu Nov 9 13:39:29 2006 for TAO_Strategies by doxygen 1.3.6