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