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_UIPMC_Connection_Handler;
00032 class TAO_ORB_Core;
00033 class TAO_Operation_Details;
00034 class TAO_Pluggable_Messaging;
00035 class TAO_Acceptor;
00036
00037
00038 typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
00039 TAO_UIPMC_SVC_HANDLER;
00040
00041 #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
00042 template class TAO_PortableGroup_Export ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>;
00043 #endif
00044
00045
00046
00047
00048
00049
00050
00051 class TAO_PortableGroup_Export TAO_UIPMC_Transport : public TAO_Transport
00052 {
00053 public:
00054
00055
00056 TAO_UIPMC_Transport (TAO_UIPMC_Connection_Handler *handler,
00057 TAO_ORB_Core *orb_core,
00058 CORBA::Boolean flag);
00059
00060
00061 ~TAO_UIPMC_Transport (void);
00062
00063
00064 virtual int handle_input (TAO_Resume_Handle &rh,
00065 ACE_Time_Value *max_wait_time = 0,
00066 int block = 0);
00067 protected:
00068
00069
00070
00071
00072
00073
00074 virtual ACE_Event_Handler * event_handler_i (void);
00075 virtual TAO_Connection_Handler *connection_handler_i (void);
00076 virtual TAO_Pluggable_Messaging *messaging_object (void);
00077
00078
00079 virtual ssize_t send (iovec *iov, int iovcnt,
00080 size_t &bytes_transferred,
00081 const ACE_Time_Value *max_wait_time);
00082
00083
00084
00085 virtual ssize_t recv (char *buf,
00086 size_t len,
00087 const ACE_Time_Value *s = 0);
00088
00089 virtual int register_handler (void);
00090
00091 public:
00092
00093
00094 virtual int send_request (TAO_Stub *stub,
00095 TAO_ORB_Core *orb_core,
00096 TAO_OutputCDR &stream,
00097 int message_semantics,
00098 ACE_Time_Value *max_wait_time);
00099
00100 virtual int send_message (TAO_OutputCDR &stream,
00101 TAO_Stub *stub = 0,
00102 int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00103 ACE_Time_Value *max_time_wait = 0);
00104
00105
00106 virtual int messaging_init (CORBA::Octet major,
00107 CORBA::Octet minor);
00108
00109
00110
00111 private:
00112
00113 int process_message (void);
00114
00115
00116 void write_unique_id (TAO_OutputCDR &miop_hdr, unsigned long unique);
00117
00118 private:
00119
00120
00121
00122 TAO_UIPMC_Connection_Handler *connection_handler_;
00123
00124
00125 TAO_Pluggable_Messaging *messaging_object_;
00126 };
00127
00128 TAO_END_VERSIONED_NAMESPACE_DECL
00129
00130 #include "ace/post.h"
00131 #endif