Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / TAO / tao / Strategies / UIOP_Connection_Handler.h
blobe829448dae3bcce13d69cf991988f2a2b08880f8
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file UIOP_Connection_Handler.h
7 * @author Originally by Ossama Othman <ossama@ece.uci.edu> as
8 * UIOP_Connect.h
9 * @author modified by Balachandran Natarajan <bala@cs.wustl.edu>
11 // ===================================================================
12 #ifndef TAO_UIOP_CONNECTION_HANDLER_H
13 #define TAO_UIOP_CONNECTION_HANDLER_H
15 #include /**/ "ace/pre.h"
17 #include "tao/orbconf.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #pragma once
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #if TAO_HAS_UIOP == 1
25 #include "tao/Strategies/UIOP_Transport.h"
26 #include "tao/Connection_Handler.h"
27 #include "tao/Wait_Strategy.h"
28 #include "ace/Acceptor.h"
29 #include "ace/Reactor.h"
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 // ****************************************************************
35 /**
36 * @class TAO_UIOP_Connection_Handler
38 * @brief Handles requests on a single connection.
40 * The Connection handler which is common for the Acceptor and
41 * the Connector
43 class TAO_Strategies_Export TAO_UIOP_Connection_Handler : public TAO_UIOP_SVC_HANDLER,
44 public TAO_Connection_Handler
46 public:
47 TAO_UIOP_Connection_Handler (ACE_Thread_Manager* t = 0);
49 /// Constructor.
50 TAO_UIOP_Connection_Handler (TAO_ORB_Core *orb_core);
52 /// Destructor.
53 ~TAO_UIOP_Connection_Handler ();
55 //@{
56 /**
57 * Connection_Handler overloads
59 virtual int open_handler (void *);
60 //@}
62 /// Close called by the Acceptor or Connector when connection
63 /// establishment fails.
64 int close (u_long = 0);
66 //@{
67 /** @name Event Handler overloads
69 virtual int open (void *);
70 virtual int resume_handler ();
71 virtual int close_connection ();
72 virtual int handle_input (ACE_HANDLE);
73 virtual int handle_output (ACE_HANDLE);
74 virtual int handle_close (ACE_HANDLE, ACE_Reactor_Mask);
75 virtual int handle_timeout (const ACE_Time_Value &current_time,
76 const void *act = 0);
77 //@}
79 /// Add ourselves to Cache.
80 int add_transport_to_cache ();
82 protected:
83 //@{
84 /**
85 * @name TAO_Connection Handler overloads
87 virtual int release_os_resources ();
88 virtual int handle_write_ready (const ACE_Time_Value *timeout);
89 //@}
92 TAO_END_VERSIONED_NAMESPACE_DECL
94 #endif /* TAO_HAS_UIOP == 1 */
96 #include /**/ "ace/post.h"
98 #endif /* TAO_UIOP_CONNECT_H */