00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TAO_SHMIOP_TRANSPORT_H
00015 #define TAO_SHMIOP_TRANSPORT_H
00016
00017 #include "ace/pre.h"
00018
00019 #include "tao/orbconf.h"
00020
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif
00024
00025 #if defined (TAO_HAS_SHMIOP) && (TAO_HAS_SHMIOP != 0)
00026
00027 #include "tao/Strategies/strategies_export.h"
00028 #include "ace/Svc_Handler.h"
00029 #include "ace/MEM_Stream.h"
00030 #include "tao/Transport.h"
00031
00032 #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
00033 template class TAO_Strategies_Export ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>;
00034 #endif
00035
00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00037
00038 class TAO_SHMIOP_Connection_Handler;
00039 class TAO_Pluggable_Messaging;
00040 class TAO_Target_Specification;
00041 class Tao_Operation_Details;
00042
00043 typedef ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>
00044 TAO_SHMIOP_SVC_HANDLER;
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 class TAO_Strategies_Export TAO_SHMIOP_Transport : public TAO_Transport
00055 {
00056 public:
00057
00058
00059 TAO_SHMIOP_Transport (TAO_SHMIOP_Connection_Handler *handler,
00060 TAO_ORB_Core *orb_core,
00061 CORBA::Boolean flag);
00062
00063
00064 ~TAO_SHMIOP_Transport (void);
00065
00066 protected:
00067
00068
00069
00070
00071
00072
00073 virtual ACE_Event_Handler * event_handler_i (void);
00074 virtual TAO_Connection_Handler *connection_handler_i (void);
00075 virtual TAO_Pluggable_Messaging *messaging_object (void);
00076
00077
00078 virtual ssize_t send (iovec *iov, int iovcnt,
00079 size_t &bytes_transferred,
00080 const ACE_Time_Value *timeout = 0);
00081
00082
00083 virtual ssize_t recv (char *buf,
00084 size_t len,
00085 const ACE_Time_Value *s = 0);
00086
00087 virtual int handle_input (TAO_Resume_Handle &rh,
00088 ACE_Time_Value *max_wait_time,
00089 int block = 0);
00090
00091
00092 public:
00093
00094
00095 virtual int send_request (TAO_Stub *stub,
00096 TAO_ORB_Core *orb_core,
00097 TAO_OutputCDR &stream,
00098 int message_semantics,
00099 ACE_Time_Value *max_wait_time);
00100
00101 virtual int send_message (TAO_OutputCDR &stream,
00102 TAO_Stub *stub = 0,
00103 int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00104 ACE_Time_Value *max_time_wait = 0);
00105
00106
00107 virtual int messaging_init (CORBA::Octet major,
00108 CORBA::Octet minor);
00109
00110 private:
00111
00112
00113 TAO_SHMIOP_Connection_Handler *connection_handler_;
00114
00115
00116 TAO_Pluggable_Messaging *messaging_object_;
00117 };
00118
00119 TAO_END_VERSIONED_NAMESPACE_DECL
00120
00121 #endif
00122
00123 #include "ace/post.h"
00124
00125 #endif