diff options
Diffstat (limited to 'TAO/tao/UIOP_Transport.cpp')
-rw-r--r-- | TAO/tao/UIOP_Transport.cpp | 73 |
1 files changed, 61 insertions, 12 deletions
diff --git a/TAO/tao/UIOP_Transport.cpp b/TAO/tao/UIOP_Transport.cpp index 8b3ffdb0555..d0b0219020e 100644 --- a/TAO/tao/UIOP_Transport.cpp +++ b/TAO/tao/UIOP_Transport.cpp @@ -18,8 +18,13 @@ #include "tao/Stub.h" #include "tao/ORB_Core.h" #include "tao/debug.h" +#include "tao/GIOP_Message_Connectors.h" +#include "tao/GIOP_Message_Lite.h" + +#if !defined (__ACE_INLINE__) +# include "tao/UIOP_Transport.i" +#endif /* ! __ACE_INLINE__ */ -#include "tao/Pluggable_Messaging.h" #if defined (ACE_ENABLE_TIMEPROBES) static const char *TAO_UIOP_Transport_Timeprobe_Description[] = @@ -122,26 +127,23 @@ TAO_UIOP_Server_Transport::~TAO_UIOP_Server_Transport (void) { } -void -TAO_UIOP_Server_Transport::messaging_init (TAO_Pluggable_Messaging_Interface *mesg) -{ - this->server_mesg_factory_ = mesg; -} - // **************************************************************** TAO_UIOP_Client_Transport:: TAO_UIOP_Client_Transport (TAO_UIOP_Client_Connection_Handler *handler, TAO_ORB_Core *orb_core) : TAO_UIOP_Transport (handler, orb_core), - client_handler_ (handler) + client_handler_ (handler), + client_mesg_factory_ (0) { } TAO_UIOP_Client_Transport::~TAO_UIOP_Client_Transport (void) { + delete this->client_mesg_factory_; } + TAO_UIOP_Client_Connection_Handler * TAO_UIOP_Client_Transport::client_handler (void) { @@ -322,11 +324,58 @@ TAO_UIOP_Client_Transport::register_handler (void) } -void -TAO_UIOP_Client_Transport::messaging_init (TAO_Pluggable_Messaging_Interface *mesg) -{ - this->client_mesg_factory_ = mesg; +int +TAO_UIOP_Client_Transport:: + messaging_init (CORBA::Octet major, + CORBA::Octet minor) +{ + if (this->client_mesg_factory_ == 0) + { + if (this->lite_flag_) + { + ACE_NEW_RETURN (this->client_mesg_factory_, + TAO_GIOP_Message_Lite, + -1); + } + else if (major == TAO_DEF_GIOP_MAJOR) + { + if (minor > TAO_DEF_GIOP_MINOR) + minor = TAO_DEF_GIOP_MINOR; + switch (minor) + { + case 0: + ACE_NEW_RETURN (this->client_mesg_factory_, + TAO_GIOP_Message_Connector_10, + 0); + break; + case 1: + ACE_NEW_RETURN (this->client_mesg_factory_, + TAO_GIOP_Message_Connector_11, + 0); + break; + default: + if (TAO_debug_level > 0) + { + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("(%N|%l|%p|%t) No matching minor version number \n")), + 0); + } + } + } + else + { + if (TAO_debug_level > 0) + { + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("(%N|%l|%p|%t) No matching major version number \n")), + 0); + } + } + } + + return 1; } + CORBA::Boolean TAO_UIOP_Client_Transport::send_request_header (TAO_Operation_Details &opdetails, |