Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / Strategies / SHMIOP_Connector.h
blob6eb0d3329a888e87ecb2f97aef7469be6e0255e0
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file SHMIOP_Connector.h
7 * SHMIOP specific connector processing
9 * @author Nanbor Wang <nanbor@cs.wustl.edu>
11 //=============================================================================
14 #ifndef TAO_SHMIOP_CONNECTOR_H
15 #define TAO_SHMIOP_CONNECTOR_H
17 #include /**/ "ace/pre.h"
19 #include "tao/orbconf.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #if defined (TAO_HAS_SHMIOP) && (TAO_HAS_SHMIOP != 0)
27 #include "ace/MEM_Connector.h"
28 #include "ace/Connector.h"
29 #include "tao/Transport_Connector.h"
30 #include "tao/Strategies/SHMIOP_Connection_Handler.h"
31 #include "tao/Resource_Factory.h"
32 #include "tao/Connector_Impl.h"
34 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
36 class TAO_SHMIOP_Endpoint;
38 // ****************************************************************
40 /**
41 * @class TAO_SHMIOP_Connector
43 * @brief SHMIOP-specific Connector bridge for pluggable protocols.
45 * Concrete instance of the TAO_Connector class. Responsible
46 * for establishing a connection with a server and is called from the
47 * Connector_Registory.
49 class TAO_Strategies_Export TAO_SHMIOP_Connector : public TAO_Connector
51 public:
52 /// Constructor.
53 TAO_SHMIOP_Connector ();
55 /// Default destructor
56 ~TAO_SHMIOP_Connector () = default;
58 /**
59 * @name The TAO_Connector Methods
61 * Please check the documentation in Transport_Connector.h for details.
63 //@{
64 int open (TAO_ORB_Core *orb_core);
65 int close ();
67 TAO_Profile *create_profile (TAO_InputCDR& cdr);
69 virtual int check_prefix (const char *endpoint);
71 virtual char object_key_delimiter () const;
72 //@}
74 public:
75 typedef TAO_Connect_Concurrency_Strategy<TAO_SHMIOP_Connection_Handler>
76 TAO_SHMIOP_CONNECT_CONCURRENCY_STRATEGY;
78 typedef TAO_Connect_Creation_Strategy<TAO_SHMIOP_Connection_Handler>
79 TAO_SHMIOP_CONNECT_CREATION_STRATEGY;
81 typedef ACE_Connect_Strategy<TAO_SHMIOP_Connection_Handler,
82 ACE_MEM_CONNECTOR>
83 TAO_SHMIOP_CONNECT_STRATEGY;
85 typedef ACE_Strategy_Connector<TAO_SHMIOP_Connection_Handler,
86 ACE_MEM_CONNECTOR>
87 TAO_SHMIOP_BASE_CONNECTOR;
89 protected:
90 /**
91 * @name More TAO_Connector Methods
93 * Please check the documentation in Transport_Connector.h for details.
95 //@{
96 int set_validate_endpoint (TAO_Endpoint *endpoint);
98 TAO_Transport *make_connection (TAO::Profile_Transport_Resolver *r,
99 TAO_Transport_Descriptor_Interface &desc,
100 ACE_Time_Value *timeout = 0);
102 virtual TAO_Profile *make_profile ();
104 /// Cancel the passed cvs handler from the connector
105 int cancel_svc_handler (TAO_Connection_Handler * svc_handler);
106 //@}
108 private:
109 /// Return the remote endpoint, a helper function
110 TAO_SHMIOP_Endpoint *remote_endpoint (TAO_Endpoint *ep);
112 private:
113 /// Local address.
114 ACE_MEM_Addr address_;
116 /// Our connect strategy.
117 TAO_SHMIOP_CONNECT_STRATEGY connect_strategy_;
119 /// The connector initiating connection requests for SHMIOP.
120 TAO_SHMIOP_BASE_CONNECTOR base_connector_;
123 TAO_END_VERSIONED_NAMESPACE_DECL
125 #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
127 #include /**/ "ace/post.h"
129 #endif /* TAO_SHMIOP_CONNECTOR_H */