Merge pull request #2216 from jwillemsen/jwi-cxxversionchecks
[ACE_TAO.git] / TAO / tao / Strategies / SCIOP_Connector.h
blobc73662fb73a967e088227735c104a6e76c376d5d
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file SCIOP_Connector.h
7 * SCIOP specific connector processing
9 * @author Jason Cohen, Lockheed Martin ATL <jcohen@atl.lmco.com>
10 * @author Keith O'Hara, Lockheed Martin ATL
12 //=============================================================================
14 #ifndef TAO_SCIOP_CONNECTOR_H
15 #define TAO_SCIOP_CONNECTOR_H
17 #include /**/ "ace/pre.h"
18 #include "tao/orbconf.h"
20 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 # pragma once
22 #endif /* ACE_LACKS_PRAGMA_ONCE */
24 #if TAO_HAS_SCIOP == 1
26 #include "tao/Transport_Connector.h"
27 #include "tao/Connector_Impl.h"
28 #include "tao/Strategies/SCIOP_Connection_Handler.h"
29 #include "ace/SOCK_SEQPACK_Connector.h"
30 #include "ace/Connector.h"
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
34 class TAO_SCIOP_Endpoint;
36 // ****************************************************************
38 /**
39 * @class TAO_SCIOP_Connector
41 * @brief SCIOP-specific Connector bridge for pluggable protocols.
43 * Concrete instance of the TAO_Connector class. Responsible
44 * for establishing a connection with a server and is called from the
45 * Connector_Registory.
47 class TAO_Strategies_Export TAO_SCIOP_Connector : public TAO_Connector
49 public:
50 /// Constructor.
51 TAO_SCIOP_Connector ();
53 /// Destructor.
54 ~TAO_SCIOP_Connector ();
56 // = The TAO_Connector methods, please check the documentation on
57 // Transport_Connector.h
58 int open (TAO_ORB_Core *orb_core);
59 int close ();
60 TAO_Profile *create_profile (TAO_InputCDR& cdr);
62 virtual int check_prefix (const char *endpoint);
64 virtual char object_key_delimiter () const;
66 public:
67 typedef TAO_Connect_Concurrency_Strategy<TAO_SCIOP_Connection_Handler>
68 TAO_SCIOP_CONNECT_CONCURRENCY_STRATEGY;
70 typedef TAO_Connect_Creation_Strategy<TAO_SCIOP_Connection_Handler>
71 TAO_SCIOP_CONNECT_CREATION_STRATEGY;
73 typedef ACE_Connect_Strategy<TAO_SCIOP_Connection_Handler,
74 ACE_SOCK_SEQPACK_CONNECTOR>
75 TAO_SCIOP_CONNECT_STRATEGY;
77 typedef ACE_Strategy_Connector<TAO_SCIOP_Connection_Handler,
78 ACE_SOCK_SEQPACK_CONNECTOR>
79 TAO_SCIOP_BASE_CONNECTOR;
81 protected:
82 // = The TAO_Connector methods, please check the documentation on
83 // Transport_Connector.h
84 int set_validate_endpoint (TAO_Endpoint *ep);
86 TAO_Transport *make_connection (TAO::Profile_Transport_Resolver *r,
87 TAO_Transport_Descriptor_Interface &desc,
88 ACE_Time_Value *timeout = 0);
90 /// More TAO_Connector methods, please check the documentation on
91 /// Transport_Connector.h
92 virtual TAO_Profile *make_profile ();
94 /// Cancel the passed cvs handler from the connector
95 int cancel_svc_handler (TAO_Connection_Handler * svc_handler);
97 private:
98 /// Return the remote endpoint, a helper function
99 TAO_SCIOP_Endpoint *remote_endpoint (TAO_Endpoint *ep);
101 /// Try to make a connection to the next endpoint in the list.
102 TAO_Transport *make_connection_i (TAO::Profile_Transport_Resolver *r,
103 TAO_Transport_Descriptor_Interface &desc,
104 ACE_Time_Value *timeout,
105 TAO_SCIOP_Endpoint *sciop_endpoint);
107 private:
108 /// Our connect strategy
109 TAO_SCIOP_CONNECT_STRATEGY connect_strategy_;
111 /// The connector initiating connection requests for SCIOP.
112 TAO_SCIOP_BASE_CONNECTOR base_connector_;
115 TAO_END_VERSIONED_NAMESPACE_DECL
117 #endif /* TAO_HAS_SCIOP == 1 */
120 #include /**/ "ace/post.h"
122 #endif /* TAO_SCIOP_CONNECTOR_H */