3 // ===================================================================
5 * @file COIOP_Connection_Handler.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
9 // ===================================================================
11 #ifndef TAO_COIOP_CONNECTION_HANDLER_H
12 #define TAO_COIOP_CONNECTION_HANDLER_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_COIOP) && (TAO_HAS_COIOP != 0)
24 #include "tao/Strategies/strategies_export.h"
25 #include "tao/Wait_Strategy.h"
26 #include "tao/Connection_Handler.h"
27 #include "tao/Strategies/COIOP_Transport.h"
28 #include "ace/Reactor.h"
29 #include "ace/Acceptor.h"
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 // ****************************************************************
36 * @class TAO_COIOP_Connection_Handler
38 * @brief Handles requests on a single connection.
40 * The Connection handler which is common for the Acceptor and
43 class TAO_Strategies_Export TAO_COIOP_Connection_Handler
44 : public TAO_COIOP_SVC_HANDLER
,
45 public TAO_Connection_Handler
48 TAO_COIOP_Connection_Handler (ACE_Thread_Manager
* t
= 0);
51 TAO_COIOP_Connection_Handler (TAO_ORB_Core
*orb_core
);
54 ~TAO_COIOP_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 ();
87 TAO_END_VERSIONED_NAMESPACE_DECL
89 #endif /* TAO_HAS_COIOP && TAO_HAS_COIOP != 0 */
91 #include /**/ "ace/post.h"
93 #endif /* TAO_COIOP_CONNECTION_HANDLER_H */