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