Invocation_Endpoint_Selectors.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   Invocation_Endpoint_Selectors.h
00006  *
00007  *  Invocation_Endpoint_Selectors.h,v 1.24 2006/04/26 17:12:47 mesnier_p Exp
00008  *
00009  * Strategies for selecting profile/endpoint from an IOR for making an
00010  * invocation.
00011  *
00012  *  @author Marina Spivak <marina@cs.wustl.edu>
00013  */
00014 //=============================================================================
00015 
00016 #ifndef TAO_INVOCATION_ENDPOINT_SELECTOR_H
00017 #define TAO_INVOCATION_ENDPOINT_SELECTOR_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "tao/TAO_Export.h"
00022 
00023 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00024 # pragma once
00025 #endif /* ACE_LACKS_PRAGMA_ONCE */
00026 
00027 #include "tao/Versioned_Namespace.h"
00028 
00029 #include "ace/CORBA_macros.h"
00030 
00031 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00032 class ACE_Time_Value;
00033 ACE_END_VERSIONED_NAMESPACE_DECL
00034 
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036 
00037 class TAO_MProfile;
00038 
00039 namespace TAO
00040 {
00041   class Profile_Transport_Resolver;
00042 }
00043 
00044 namespace CORBA
00045 {
00046   class Exception;
00047   class Environment;
00048 }
00049 /**
00050  * @class TAO_Invocation_Endpoint_Selector
00051  *
00052  * @brief Defines the interface for policy-based endpoint selection
00053  * strategies.
00054  *
00055  * Selects/reselects server endpoint for an Invocation.  Different
00056  * concrete strategies perform selection based on different
00057  * policies.
00058  * @par
00059  * All endpoint selection strategies are stateless objects - any
00060  * necessary state is stored in Invocation's
00061  * @c endpoint_selection_state_.
00062  */
00063 class TAO_Export TAO_Invocation_Endpoint_Selector
00064 {
00065 public:
00066 
00067   /// Destructor.
00068   virtual ~TAO_Invocation_Endpoint_Selector (void);
00069 
00070   /// Select the endpoint and set @a r's @c profile_
00071   virtual void select_endpoint (TAO::Profile_Transport_Resolver *r,
00072                                 ACE_Time_Value *val
00073                                 ACE_ENV_ARG_DECL) = 0;
00074 
00075 };
00076 
00077 // ****************************************************************
00078 
00079 /**
00080  * @class TAO_Default_Endpoint_Selector
00081  *
00082  * @brief Default strategy for endpoint selection.
00083  *
00084  * This strategy is used when there are no policies set or when
00085  * the only policy set is RTCORBA::PriorityModelPolicy and its
00086  * value is RTCORBA::SERVER_DECLARED.
00087  * The strategy is to try the first endpoint from the first
00088  * profile in the IOR.  If that doesn't work, try the next
00089  * profile, and so on.
00090  */
00091 class TAO_Export TAO_Default_Endpoint_Selector
00092   : public TAO_Invocation_Endpoint_Selector
00093 {
00094 public:
00095 
00096   /// Destructor.
00097   virtual ~TAO_Default_Endpoint_Selector (void);
00098 
00099   virtual void select_endpoint (TAO::Profile_Transport_Resolver *r,
00100                                 ACE_Time_Value *val
00101                                 ACE_ENV_ARG_DECL);
00102 
00103 };
00104 
00105 TAO_END_VERSIONED_NAMESPACE_DECL
00106 
00107 #include /**/ "ace/post.h"
00108 
00109 #endif  /* TAO_INVOCATION_ENDPOINT_SELECTOR_H */

Generated on Thu Nov 9 11:54:14 2006 for TAO by doxygen 1.3.6