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

default_client.h

Go to the documentation of this file.
00001 // This may look like C, but it's really -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     default_client.h
00006  *
00007  *  $Id: default_client.h,v 1.1.1.4 2003/02/21 18:36:45 chad Exp $
00008  *
00009  *  @author  Chris Cleeland
00010  */
00011 //=============================================================================
00012 
00013 
00014 #ifndef TAO_DEFAULT_CLIENT_H
00015 #define TAO_DEFAULT_CLIENT_H
00016 #include "ace/pre.h"
00017 
00018 #include "tao/Client_Strategy_Factory.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "ace/Service_Config.h"
00025 
00026 /**
00027  * @class TAO_Default_Client_Strategy_Factory
00028  *
00029  * @brief This is the "default" client strategy factor for TAO.  It
00030  * includes strategies that are configured through command-line
00031  * options so that everything operates as if there were no
00032  * dynamically-linkable strategies.
00033  */
00034 class TAO_Export TAO_Default_Client_Strategy_Factory : public TAO_Client_Strategy_Factory
00035 {
00036 public:
00037   // = Initialization and termination methods.
00038   /// Constructor.
00039   TAO_Default_Client_Strategy_Factory (void);
00040 
00041   /// Destructor.
00042   virtual ~TAO_Default_Client_Strategy_Factory (void);
00043 
00044   // = Service Configurator hooks.
00045   /// Dynamic linking hook
00046   virtual int init (int argc, ACE_TCHAR* argv[]);
00047 
00048   /// Parse svc.conf arguments
00049   int parse_args (int argc, ACE_TCHAR* argv[]);
00050 
00051   // = Check Client_Strategy_Factory.h for the documentation of the
00052   //   following methods.
00053   virtual ACE_Lock* create_profile_lock (void);
00054   virtual TAO_Transport_Mux_Strategy *create_transport_mux_strategy (TAO_Transport *transport);
00055   virtual int allow_callback (void);
00056   virtual TAO_Wait_Strategy *create_wait_strategy (TAO_Transport *transport);
00057   virtual TAO_Connect_Strategy *create_connect_strategy (TAO_ORB_Core *);
00058   virtual ACE_Lock *create_ft_service_retention_id_lock (void);
00059 
00060 protected:
00061   void report_option_value_error (const ACE_TCHAR* option_name,
00062                                   const ACE_TCHAR* option_value);
00063 
00064 private:
00065   enum Lock_Type
00066   {
00067     TAO_NULL_LOCK,
00068     TAO_THREAD_LOCK
00069   };
00070 
00071   /// the lock type for forwarding IIOP Profile
00072   Lock_Type profile_lock_type_;
00073 
00074   enum Transport_Mux_Strategy
00075   {
00076     TAO_MUXED_TMS,
00077     TAO_EXCLUSIVE_TMS
00078   };
00079 
00080   /// The client Request Mux Strategy.
00081   Transport_Mux_Strategy transport_mux_strategy_;
00082 
00083   enum Wait_Strategy
00084   {
00085     TAO_WAIT_ON_LEADER_FOLLOWER,
00086     TAO_WAIT_ON_REACTOR,
00087     TAO_WAIT_ON_READ
00088   };
00089 
00090   /// The wait-for-reply strategy.
00091   Wait_Strategy wait_strategy_;
00092 
00093   enum Connect_Strategy
00094   {
00095     TAO_BLOCKED_CONNECT,
00096     TAO_REACTIVE_CONNECT,
00097     TAO_LEADER_FOLLOWER_CONNECT
00098   };
00099 
00100   /// The connection initiation strategy.
00101   Connect_Strategy connect_strategy_;
00102 };
00103 
00104 #if defined (__ACE_INLINE__)
00105 # include "tao/default_client.i"
00106 #endif /* __ACE_INLINE__ */
00107 
00108 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_Default_Client_Strategy_Factory)
00109 ACE_FACTORY_DECLARE (TAO, TAO_Default_Client_Strategy_Factory)
00110 
00111 #include "ace/post.h"
00112 #endif /* TAO_DEFAULT_CLIENT_H */

Generated on Mon Jun 16 13:48:13 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002