3 //=============================================================================
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)
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 // ****************************************************************
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
53 TAO_SHMIOP_Connector ();
55 /// Default destructor
56 ~TAO_SHMIOP_Connector () = default;
59 * @name The TAO_Connector Methods
61 * Please check the documentation in Transport_Connector.h for details.
64 int open (TAO_ORB_Core
*orb_core
);
67 TAO_Profile
*create_profile (TAO_InputCDR
& cdr
);
69 virtual int check_prefix (const char *endpoint
);
71 virtual char object_key_delimiter () const;
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
,
83 TAO_SHMIOP_CONNECT_STRATEGY
;
85 typedef ACE_Strategy_Connector
<TAO_SHMIOP_Connection_Handler
,
87 TAO_SHMIOP_BASE_CONNECTOR
;
91 * @name More TAO_Connector Methods
93 * Please check the documentation in Transport_Connector.h for details.
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
);
109 /// Return the remote endpoint, a helper function
110 TAO_SHMIOP_Endpoint
*remote_endpoint (TAO_Endpoint
*ep
);
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 */