Merge pull request #2218 from jwillemsen/jwi-pthreadsigmask
[ACE_TAO.git] / TAO / tao / Strategies / SHMIOP_Connection_Handler.h
blob4a688d9128df8222f8e318ab2226f9a466825190
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file SHMIOP_Connection_Handler.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
8 */
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)
19 #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
34 /**
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
40 * the Connector
42 class TAO_Strategies_Export TAO_SHMIOP_Connection_Handler :
43 public TAO_SHMIOP_SVC_HANDLER,
44 public TAO_Connection_Handler
46 public:
47 /// Constructor.
48 TAO_SHMIOP_Connection_Handler (ACE_Thread_Manager* t = 0);
50 /// Constructor.
51 TAO_SHMIOP_Connection_Handler (TAO_ORB_Core *orb_core);
53 /// Destructor.
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 *);
60 //@{
61 /**
62 * Connection_Handler overloads
64 virtual int open_handler (void *);
65 //@}
67 /// Close called by the Acceptor or Connector when connection
68 /// establishment fails.
69 int close (u_long = 0);
71 //@{
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 &current_time,
80 const void *act = 0);
81 //@}
83 /// Add ourselves to Cache.
84 int add_transport_to_cache ();
86 protected:
87 //@{
88 /**
89 * @name TAO_Connection Handler overloads
91 virtual int release_os_resources ();
92 virtual int handle_write_ready (const ACE_Time_Value *timeout);
93 //@}
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 */