SCIOP_Connector.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // SCIOP_Connector.h,v 1.13 2006/06/01 13:16:13 jwillemsen Exp
00004 //=============================================================================
00005 /**
00006  *  @file    SCIOP_Connector.h
00007  *
00008  *  SCIOP specific connector processing
00009  *
00010  *  @author  Jason Cohen, Lockheed Martin ATL  <jcohen@atl.lmco.com>
00011  *  @author  Keith O'Hara, Lockheed Martin ATL
00012  */
00013 //=============================================================================
00014 
00015 #ifndef TAO_SCIOP_CONNECTOR_H
00016 #define TAO_SCIOP_CONNECTOR_H
00017 
00018 #include /**/ "ace/pre.h"
00019 #include "tao/orbconf.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #if TAO_HAS_SCIOP == 1
00026 
00027 #include "tao/Transport_Connector.h"
00028 #include "tao/Connector_Impl.h"
00029 #include "tao/Strategies/SCIOP_Connection_Handler.h"
00030 #include "ace/SOCK_SEQPACK_Connector.h"
00031 #include "ace/Connector.h"
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 class TAO_SCIOP_Endpoint;
00036 
00037 // ****************************************************************
00038 
00039 /**
00040  * @class TAO_SCIOP_Connector
00041  *
00042  * @brief SCIOP-specific Connector bridge for pluggable protocols.
00043  *
00044  * Concrete instance of the TAO_Connector class.  Responsible
00045  * for establishing a connection with a server and is called from the
00046  * Connector_Registory.
00047  */
00048 class TAO_Strategies_Export TAO_SCIOP_Connector : public TAO_Connector
00049 {
00050 public:
00051   // = Initialization and termination methods.
00052   /// Constructor.
00053   TAO_SCIOP_Connector (CORBA::Boolean flag = false);
00054 
00055   /// Destructor.
00056   ~TAO_SCIOP_Connector (void);
00057 
00058   // = The TAO_Connector methods, please check the documentation on
00059   // Transport_Connector.h
00060   int open (TAO_ORB_Core *orb_core);
00061   int close (void);
00062   TAO_Profile *create_profile (TAO_InputCDR& cdr);
00063 
00064   virtual int check_prefix (const char *endpoint);
00065 
00066   virtual char object_key_delimiter (void) const;
00067 
00068 public:
00069 
00070   typedef TAO_Connect_Concurrency_Strategy<TAO_SCIOP_Connection_Handler>
00071           TAO_SCIOP_CONNECT_CONCURRENCY_STRATEGY;
00072 
00073   typedef TAO_Connect_Creation_Strategy<TAO_SCIOP_Connection_Handler>
00074           TAO_SCIOP_CONNECT_CREATION_STRATEGY;
00075 
00076   typedef ACE_Connect_Strategy<TAO_SCIOP_Connection_Handler,
00077                                ACE_SOCK_SEQPACK_CONNECTOR>
00078           TAO_SCIOP_CONNECT_STRATEGY ;
00079 
00080   typedef ACE_Strategy_Connector<TAO_SCIOP_Connection_Handler,
00081                                  ACE_SOCK_SEQPACK_CONNECTOR>
00082           TAO_SCIOP_BASE_CONNECTOR;
00083 
00084 protected:
00085 
00086   // = The TAO_Connector methods, please check the documentation on
00087   // Transport_Connector.h
00088   int set_validate_endpoint (TAO_Endpoint *ep);
00089 
00090   TAO_Transport *make_connection (TAO::Profile_Transport_Resolver *r,
00091                                   TAO_Transport_Descriptor_Interface &desc,
00092                                   ACE_Time_Value *timeout = 0);
00093 
00094   /// More TAO_Connector methods, please check the documentation on
00095   /// Transport_Connector.h
00096   virtual TAO_Profile *make_profile (ACE_ENV_SINGLE_ARG_DECL);
00097 
00098   /// Cancel the passed cvs handler from the connector
00099   int cancel_svc_handler (TAO_Connection_Handler * svc_handler);
00100 
00101 protected:
00102 
00103   /// Do we need to use a GIOP_Lite for sending messages?
00104   CORBA::Boolean lite_flag_;
00105 
00106 
00107 private:
00108 
00109   /// Return the remote endpoint, a helper function
00110   TAO_SCIOP_Endpoint *remote_endpoint (TAO_Endpoint *ep);
00111 
00112   /// Try to make a connection to the next endpoint in the list.
00113   TAO_Transport *make_connection_i (TAO::Profile_Transport_Resolver *r,
00114                                     TAO_Transport_Descriptor_Interface &desc,
00115                                     ACE_Time_Value *timeout,
00116                                     TAO_SCIOP_Endpoint *sciop_endpoint);
00117 
00118 private:
00119 
00120   /// Our connect strategy
00121   TAO_SCIOP_CONNECT_STRATEGY connect_strategy_;
00122 
00123   /// The connector initiating connection requests for SCIOP.
00124   TAO_SCIOP_BASE_CONNECTOR base_connector_;
00125 };
00126 
00127 TAO_END_VERSIONED_NAMESPACE_DECL
00128 
00129 #endif /* TAO_HAS_SCIOP == 1 */
00130 
00131 
00132 #include /**/ "ace/post.h"
00133 
00134 #endif  /* TAO_SCIOP_CONNECTOR_H */

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