3 // ===================================================================
5 * @file SHMIOP_Connection_Handler.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
9 // ===================================================================
11 #ifndef TAO_SHMIOP_CONNECT_H
12 #define TAO_SHMIOP_CONNECT_H
14 #include /**/ "ace/pre.h"
16 #include "tao/orbconf.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (TAO_HAS_SHMIOP) && (TAO_HAS_SHMIOP != 0)
24 #include "ace/Reactor.h"
25 #include "ace/Acceptor.h"
26 #include "tao/Wait_Strategy.h"
27 #include "tao/Connection_Handler.h"
28 #include "tao/Strategies/SHMIOP_Transport.h"
30 // ****************************************************************
32 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
35 * @class TAO_SHMIOP_Connection_Handler
37 * @brief Handles requests on a single connection.
39 * The Connection handler which is common for the Acceptor and
42 class TAO_Strategies_Export TAO_SHMIOP_Connection_Handler
:
43 public TAO_SHMIOP_SVC_HANDLER
,
44 public TAO_Connection_Handler
48 TAO_SHMIOP_Connection_Handler (ACE_Thread_Manager
* t
= 0);
51 TAO_SHMIOP_Connection_Handler (TAO_ORB_Core
*orb_core
);
54 ~TAO_SHMIOP_Connection_Handler ();
56 /// Called by the <Strategy_Acceptor> when the handler is completely
57 /// connected. Argument is unused.
58 virtual int open (void *);
62 * Connection_Handler overloads
64 virtual int open_handler (void *);
67 /// Close called by the Acceptor or Connector when connection
68 /// establishment fails.
69 int close (u_long
= 0);
72 /** @name Event Handler overloads
74 virtual int resume_handler ();
75 virtual int close_connection ();
76 virtual int handle_input (ACE_HANDLE
);
77 virtual int handle_output (ACE_HANDLE
);
78 virtual int handle_close (ACE_HANDLE
, ACE_Reactor_Mask
);
79 virtual int handle_timeout (const ACE_Time_Value
¤t_time
,
83 /// Add ourselves to Cache.
84 int add_transport_to_cache ();
89 * @name TAO_Connection Handler overloads
91 virtual int release_os_resources ();
92 virtual int handle_write_ready (const ACE_Time_Value
*timeout
);
96 TAO_END_VERSIONED_NAMESPACE_DECL
98 #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
100 #include /**/ "ace/post.h"
102 #endif /* TAO_SHMIOP_CONNECT_H */