Merge pull request #2218 from jwillemsen/jwi-pthreadsigmask
[ACE_TAO.git] / TAO / tao / Strategies / SHMIOP_Transport.h
blobce57615d10c7c2bae77d657611e9559c7cbb4fd6
1 // -*- C++ -*-
3 // ===================================================================
4 /**
5 * @file SHMIOP_Transport.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
8 * @author Balachandran Natarajan <bala@cs.wustl.edu>
9 */
10 // ===================================================================
12 #ifndef TAO_SHMIOP_TRANSPORT_H
13 #define TAO_SHMIOP_TRANSPORT_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 defined (TAO_HAS_SHMIOP) && (TAO_HAS_SHMIOP != 0)
25 #include "tao/Strategies/strategies_export.h"
26 #include "ace/Svc_Handler.h"
27 #include "ace/MEM_Stream.h"
28 #include "tao/Transport.h"
30 #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
31 template class TAO_Strategies_Export ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>;
32 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT */
34 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
36 class TAO_SHMIOP_Connection_Handler;
37 class TAO_Target_Specification;
38 class Tao_Operation_Details;
40 typedef ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>
41 TAO_SHMIOP_SVC_HANDLER;
43 /**
44 * @class TAO_SHMIOP_Transport
46 * @brief Specialization of the base TAO_Transport class to handle the
47 * SHMIOP protocol.
50 class TAO_Strategies_Export TAO_SHMIOP_Transport : public TAO_Transport
52 public:
53 /// Constructor.
54 TAO_SHMIOP_Transport (TAO_SHMIOP_Connection_Handler *handler,
55 TAO_ORB_Core *orb_core);
57 /// Default destructor.
58 ~TAO_SHMIOP_Transport ();
60 protected:
61 /**
62 * @name Overridden Template Methods
64 * These are implementations of template methods declared by TAO_Transport.
66 //@{
67 virtual ACE_Event_Handler * event_handler_i ();
68 virtual TAO_Connection_Handler *connection_handler_i ();
70 /// Write the complete Message_Block chain to the connection.
71 virtual ssize_t send (iovec *iov, int iovcnt,
72 size_t &bytes_transferred,
73 const ACE_Time_Value *timeout = 0);
75 /// Read len bytes from into buf.
76 virtual ssize_t recv (char *buf,
77 size_t len,
78 const ACE_Time_Value *s = 0);
80 virtual int handle_input (TAO_Resume_Handle &rh,
81 ACE_Time_Value *max_wait_time);
82 //@}
84 public:
85 /// @todo These methods IMHO should have more meaningful names.
86 /// The names seem to indicate nothing.
87 virtual int send_request (TAO_Stub *stub,
88 TAO_ORB_Core *orb_core,
89 TAO_OutputCDR &stream,
90 TAO_Message_Semantics message_semantics,
91 ACE_Time_Value *max_wait_time);
93 virtual int send_message (TAO_OutputCDR &stream,
94 TAO_Stub *stub = 0,
95 TAO_ServerRequest *request = 0,
96 TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
97 ACE_Time_Value *max_time_wait = 0);
99 private:
100 /// The connection service handler used for accessing lower layer
101 /// communication protocols.
102 TAO_SHMIOP_Connection_Handler *connection_handler_;
105 TAO_END_VERSIONED_NAMESPACE_DECL
107 #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
109 #include /**/ "ace/post.h"
111 #endif /* TAO_SHMIOP_TRANSPORT_H */