summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>2001-04-05 17:30:03 +0000
committerbala <balanatarajan@users.noreply.github.com>2001-04-05 17:30:03 +0000
commitbdf9e6ccca1b1ea4708ae9a98fe4a11077ddf0e1 (patch)
tree4178306d13ceddcdc0ecc3ec7704647f1d1a4951
parent77fdf3a2dc8d7f924c4bb07446faca325cd78953 (diff)
downloadATCD-bdf9e6ccca1b1ea4708ae9a98fe4a11077ddf0e1.tar.gz
ChangeLogTag:Thu Apr 5 12:22:33 2001 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r--TAO/examples/PluggableUDP/DIOP/DIOP_Transport.cpp72
-rw-r--r--TAO/examples/PluggableUDP/DIOP/DIOP_Transport.h21
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp55
-rw-r--r--TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h23
-rw-r--r--TAO/tao/Asynch_Invocation.cpp4
-rw-r--r--TAO/tao/IIOP_Transport.cpp61
-rw-r--r--TAO/tao/IIOP_Transport.h23
-rw-r--r--TAO/tao/Invocation.cpp26
-rw-r--r--TAO/tao/Strategies/SHMIOP_Transport.cpp56
-rw-r--r--TAO/tao/Strategies/SHMIOP_Transport.h21
-rw-r--r--TAO/tao/Strategies/UIOP_Transport.cpp55
-rw-r--r--TAO/tao/Strategies/UIOP_Transport.h21
-rw-r--r--TAO/tao/Transport.cpp48
-rw-r--r--TAO/tao/Transport.h72
-rw-r--r--TAO/tao/Transport.inl3
15 files changed, 146 insertions, 415 deletions
diff --git a/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.cpp b/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.cpp
index 0230059bb78..5d650437d70 100644
--- a/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.cpp
+++ b/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.cpp
@@ -58,6 +58,13 @@ TAO_DIOP_Transport::event_handler_i (void)
return this->connection_handler_;
}
+TAO_Pluggable_Messaging *
+TAO_DIOP_Transport::messaging_object (void)
+{
+ return this->messaging_object_;
+}
+
+
ssize_t
TAO_DIOP_Transport::send_i (const ACE_Message_Block *message_block,
const ACE_Time_Value * /*max_wait_time*/,
@@ -352,71 +359,6 @@ TAO_DIOP_Transport::send_message (TAO_OutputCDR &stream,
}
-void
-TAO_DIOP_Transport::start_request (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification & /*spec */,
- TAO_OutputCDR & /*output */,
- CORBA::Environment & /*ACE_TRY_ENV*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // @@ This method should NO longer be required..
-
- /* if (this->client_mesg_factory_->write_protocol_header
- (TAO_PLUGGABLE_MESSAGE_REQUEST,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());*/
-}
-
-
-void
-TAO_DIOP_Transport::start_locate (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->messaging_object_->generate_locate_request_header (opdetails,
- spec,
- output) == -1)
- ACE_THROW (CORBA::MARSHAL ());
-}
-
-
-CORBA::Boolean
-TAO_DIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
-{
-// @@ Frank: No Bi Dir DIOP yet..
-/*
- // Check whether we have a Bi Dir DIOP policy set, whether the
- // messaging objects are ready to handle bidirectional connections
- // and also make sure that we have not recd. or sent any information
- // regarding this before...
- if (this->orb_core ()->bidir_giop_policy () &&
- this->messaging_object_->is_ready_for_bidirectional () &&
- this->bidirectional_flag () < 0)
- {
- this->set_bidir_context_info (opdetails);
-
- // Set the flag to 0
- this->bidirectional_flag (0);
- }
-
- // Modify the request id if we have BiDirectional client/server
- // setup
- opdetails.modify_request_id (this->bidirectional_flag ());
-*/
- // We are going to pass on this request to the underlying messaging
- // layer. It should take care of this request
- if (this->messaging_object_->generate_request_header (opdetails,
- spec,
- msg) == -1)
- return 0;
-
- return 1;
-}
int
TAO_DIOP_Transport::messaging_init (CORBA::Octet major,
diff --git a/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.h b/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.h
index 58c6057b5f6..b576aa11ede 100644
--- a/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.h
+++ b/TAO/examples/PluggableUDP/DIOP/DIOP_Transport.h
@@ -69,6 +69,8 @@ protected:
virtual ACE_Event_Handler *event_handler_i (void);
+ virtual TAO_Pluggable_Messaging *messaging_object (void);
+
/// Write the complete Message_Block chain to the connection.
virtual ssize_t send_i (const ACE_Message_Block *mblk,
const ACE_Time_Value *s = 0,
@@ -106,25 +108,6 @@ public:
int twoway = 1,
ACE_Time_Value *max_time_wait = 0);
- virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual CORBA::Boolean
- send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
/// Initialising the messaging object
virtual int messaging_init (CORBA::Octet major,
CORBA::Octet minor);
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
index d6fe083c88b..d6bb21c2327 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp
@@ -64,6 +64,13 @@ TAO_SSLIOP_Transport::event_handler_i (void)
return this->connection_handler_;
}
+TAO_Pluggable_Messaging *
+TAO_SSLIOP_Transport::event_handler_i (void)
+{
+ return this->messaging_object_;
+}
+
+
ssize_t
TAO_SSLIOP_Transport::send_i (const ACE_Message_Block *message_block,
const ACE_Time_Value *max_wait_time,
@@ -268,43 +275,10 @@ TAO_SSLIOP_Transport::send_message (TAO_OutputCDR &stream,
}
-void
-TAO_SSLIOP_Transport::start_request (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification & /*spec */,
- TAO_OutputCDR & /*output */,
- CORBA::Environment & /*ACE_TRY_ENV*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // TAO_FUNCTION_PP_TIMEPROBE (TAO_IIOP_CLIENT_TRANSPORT_START_REQUEST_START);
-
- // @@ This method should NO longer be required..
-
- /* if (this->client_mesg_factory_->write_protocol_header
- (TAO_PLUGGABLE_MESSAGE_REQUEST,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());*/
-}
-
-
-void
-TAO_SSLIOP_Transport::start_locate (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->messaging_object_->generate_locate_request_header (opdetails,
- spec,
- output) == -1)
- ACE_THROW (CORBA::MARSHAL ());
-}
-
-
-CORBA::Boolean
-TAO_SSLIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
+int
+TAO_SSLIOP_Transport::send_request_header (TAO_Target_Specification &spec,
+ TAO_Operation_Details &opdetails,
+ TAO_OutputCDR &msg)
{
// Check whether we have a Bi Dir IIOP policy set, whether the
// messaging objects are ready to handle bidirectional connections
@@ -326,11 +300,7 @@ TAO_SSLIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
// We are going to pass on this request to the underlying messaging
// layer. It should take care of this request
- if (this->messaging_object_->generate_request_header (opdetails,
- spec,
- msg) == -1)
- return 0;
-
+ return TAO_Transport::generate_request_header (op
return 1;
}
@@ -614,4 +584,3 @@ TAO_SSLIOP_Transport::connection_handler (void) const
return connection_handler_;
}
#endif
-
diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
index 891748a6283..0a9f8abf7aa 100644
--- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
+++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.h
@@ -80,6 +80,8 @@ protected:
virtual ACE_Event_Handler *event_handler_i (void);
+ virtual TAO_Pluggable_Messaging *messaging_object (void);
+
/// Write the complete Message_Block chain to the connection.
virtual ssize_t send_i (const ACE_Message_Block *mblk,
const ACE_Time_Value *s = 0,
@@ -116,24 +118,9 @@ public:
int twoway = 1,
ACE_Time_Value *max_time_wait = 0);
- virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual CORBA::Boolean
- send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
+ virtual int generate_request_header (TAO_Target_Specification &spec,
+ TAO_Operation_Details &opdetails,
+ TAO_OutputCDR &msg);
/// Initialising the messaging object
virtual int messaging_init (CORBA::Octet major,
diff --git a/TAO/tao/Asynch_Invocation.cpp b/TAO/tao/Asynch_Invocation.cpp
index 37a2deb98bc..eec74ba8c59 100644
--- a/TAO/tao/Asynch_Invocation.cpp
+++ b/TAO/tao/Asynch_Invocation.cpp
@@ -72,10 +72,6 @@ TAO_GIOP_Asynch_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
ACE_CHECK;
this->target_spec_.target_specifier (this->profile_->object_key ());
- this->transport_->start_request (this->orb_core_,
- this->target_spec_,
- this->out_stream_,
- ACE_TRY_ENV);
}
// **************************************************************************
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index d407766977f..4ff0432bbd4 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -65,6 +65,12 @@ TAO_IIOP_Transport::event_handler_i (void)
return this->connection_handler_;
}
+TAO_Pluggable_Messaging *
+TAO_IIOP_Transport::messaging_object (void)
+{
+ return this->messaging_object_;
+}
+
ssize_t
TAO_IIOP_Transport::send_i (const ACE_Message_Block *message_block,
const ACE_Time_Value *max_wait_time,
@@ -173,10 +179,6 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream,
if (this->messaging_object_->format_message (stream) != 0)
return -1;
- // Strictly speaking, should not need to loop here because the
- // socket never gets set to a nonblocking mode ... some Linux
- // versions seem to need it though. Leaving it costs little.
-
// This guarantees to send all data (bytes) or return an error.
ssize_t n = this->send_or_buffer (stub,
twoway,
@@ -209,43 +211,10 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream,
}
-void
-TAO_IIOP_Transport::start_request (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification & /*spec */,
- TAO_OutputCDR & /*output */,
- CORBA::Environment & /*ACE_TRY_ENV*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // TAO_FUNCTION_PP_TIMEPROBE (TAO_IIOP_CLIENT_TRANSPORT_START_REQUEST_START);
-
- // @@ This method should NO longer be required..
-
- /* if (this->client_mesg_factory_->write_protocol_header
- (TAO_PLUGGABLE_MESSAGE_REQUEST,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());*/
-}
-
-
-void
-TAO_IIOP_Transport::start_locate (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->messaging_object_->generate_locate_request_header (opdetails,
- spec,
- output) == -1)
- ACE_THROW (CORBA::MARSHAL ());
-}
-
-
-CORBA::Boolean
-TAO_IIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
+int
+TAO_IIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg)
{
// Check whether we have a Bi Dir IIOP policy set, whether the
// messaging objects are ready to handle bidirectional connections
@@ -265,14 +234,10 @@ TAO_IIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
// setup
opdetails.modify_request_id (this->bidirectional_flag ());
- // We are going to pass on this request to the underlying messaging
- // layer. It should take care of this request
- if (this->messaging_object_->generate_request_header (opdetails,
- spec,
- msg) == -1)
- return 0;
- return 1;
+ return TAO_Transport::generate_request_header (opdetails,
+ spec,
+ msg);
}
int
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index f882ef18ce2..6190c9b353e 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -72,6 +72,9 @@ protected:
/// Must be called with transport's lock held.
virtual ACE_Event_Handler *event_handler_i (void);
+ /// Access the underlying messaging object
+ virtual TAO_Pluggable_Messaging *messaging_object (void);
+
/// Write the complete Message_Block chain to the connection.
/// Must be called with transport's lock held.
virtual ssize_t send_i (const ACE_Message_Block *mblk,
@@ -111,23 +114,9 @@ public:
int twoway = 1,
ACE_Time_Value *max_time_wait = 0);
- virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual CORBA::Boolean send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
+ virtual int generate_request_header (TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg);
/// Initialising the messaging object
virtual int messaging_init (CORBA::Octet major,
diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp
index 5501e1e3694..507e73b406e 100644
--- a/TAO/tao/Invocation.cpp
+++ b/TAO/tao/Invocation.cpp
@@ -378,10 +378,10 @@ TAO_GIOP_Invocation::prepare_header (CORBA::Octet response_flags,
this->op_details_.response_flags (response_flags);
// Send the request for the header
- if (this->transport_->send_request_header (this->op_details_,
- this->target_spec_,
- this->out_stream_)
- == 0)
+ if (this->transport_->generate_request_header (this->op_details_,
+ this->target_spec_,
+ this->out_stream_)
+ == -1)
{
ACE_THROW (CORBA::MARSHAL ());
}
@@ -838,11 +838,6 @@ TAO_GIOP_Twoway_Invocation::start (CORBA_Environment &ACE_TRY_ENV)
TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
- this->transport_->start_request (this->orb_core_,
- this->target_spec_,
- this->out_stream_,
- ACE_TRY_ENV);
-
this->rd_.reply_received () = 0;
}
@@ -965,10 +960,6 @@ TAO_GIOP_Oneway_Invocation::start (CORBA_Environment &ACE_TRY_ENV)
TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
- this->transport_->start_request (this->orb_core_,
- this->target_spec_,
- this->out_stream_,
- ACE_TRY_ENV);
}
int
@@ -1024,12 +1015,9 @@ TAO_GIOP_Locate_Request_Invocation::start (CORBA_Environment &ACE_TRY_ENV)
TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
- this->transport_->start_locate (this->orb_core_,
- this->target_spec_,
- this->op_details_,
- this->out_stream_,
- ACE_TRY_ENV);
-
+ this->transport_->generate_locate_request (this->target_spec_,
+ this->op_details_,
+ this->out_stream_);
this->rd_.reply_received () = 0;
}
diff --git a/TAO/tao/Strategies/SHMIOP_Transport.cpp b/TAO/tao/Strategies/SHMIOP_Transport.cpp
index 0702b07e05f..4f3b4a95382 100644
--- a/TAO/tao/Strategies/SHMIOP_Transport.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Transport.cpp
@@ -61,6 +61,14 @@ TAO_SHMIOP_Transport::event_handler_i (void)
return this->connection_handler_;
}
+
+TAO_Pluggable_Messaging *
+TAO_SHMIOP_Transport::messaging_object (void)
+{
+ return this->messaging_object_;
+}
+
+
ssize_t
TAO_SHMIOP_Transport::send_i (const ACE_Message_Block *message_block,
const ACE_Time_Value *max_wait_time,
@@ -203,54 +211,6 @@ TAO_SHMIOP_Transport::send_message (TAO_OutputCDR &stream,
}
-void
-TAO_SHMIOP_Transport::start_request (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification & /*spec */,
- TAO_OutputCDR & /*output */,
- CORBA::Environment & /*ACE_TRY_ENV*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // TAO_FUNCTION_PP_TIMEPROBE (TAO_SHMIOP_CLIENT_TRANSPORT_START_REQUEST_START);
-
- // @@ This method should NO longer be required..
-
- /* if (this->client_mesg_factory_->write_protocol_header
- (TAO_PLUGGABLE_MESSAGE_REQUEST,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());*/
-}
-
-
-void
-TAO_SHMIOP_Transport::start_locate (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->messaging_object_->generate_locate_request_header (opdetails,
- spec,
- output) == -1)
- ACE_THROW (CORBA::MARSHAL ());
-}
-
-
-CORBA::Boolean
-TAO_SHMIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
-{
- // We are going to pass on this request to the underlying messaging
- // layer. It should take care of this request
- if (this->messaging_object_->generate_request_header (opdetails,
- spec,
- msg) == -1)
- return 0;
-
- return 1;
-}
-
int
TAO_SHMIOP_Transport::messaging_init (CORBA::Octet major,
CORBA::Octet minor)
diff --git a/TAO/tao/Strategies/SHMIOP_Transport.h b/TAO/tao/Strategies/SHMIOP_Transport.h
index 5c6f4e84176..dc679330824 100644
--- a/TAO/tao/Strategies/SHMIOP_Transport.h
+++ b/TAO/tao/Strategies/SHMIOP_Transport.h
@@ -64,6 +64,8 @@ protected:
virtual ACE_Event_Handler *event_handler_i (void);
+ virtual TAO_Pluggable_Messaging *messaging_object (void);
+
/// Write the complete Message_Block chain to the connection.
virtual ssize_t send_i (const ACE_Message_Block *mblk,
const ACE_Time_Value *s = 0,
@@ -100,25 +102,6 @@ public:
int twoway = 1,
ACE_Time_Value *max_time_wait = 0);
- virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual CORBA::Boolean
- send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
/// Initialising the messaging object
virtual int messaging_init (CORBA::Octet major,
CORBA::Octet minor);
diff --git a/TAO/tao/Strategies/UIOP_Transport.cpp b/TAO/tao/Strategies/UIOP_Transport.cpp
index 5a438d9f994..fa295c83803 100644
--- a/TAO/tao/Strategies/UIOP_Transport.cpp
+++ b/TAO/tao/Strategies/UIOP_Transport.cpp
@@ -61,6 +61,13 @@ TAO_UIOP_Transport::event_handler_i (void)
return this->connection_handler_;
}
+TAO_Pluggable_Messaging *
+TAO_UIOP_Transport::messaging_object (void)
+{
+ return this->messaging_object_;
+}
+
+
ssize_t
TAO_UIOP_Transport::send_i (const ACE_Message_Block *message_block,
const ACE_Time_Value *max_wait_time,
@@ -204,54 +211,6 @@ TAO_UIOP_Transport::send_message (TAO_OutputCDR &stream,
}
-void
-TAO_UIOP_Transport::start_request (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification & /*spec */,
- TAO_OutputCDR & /*output */,
- CORBA::Environment & /*ACE_TRY_ENV*/)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- // TAO_FUNCTION_PP_TIMEPROBE (TAO_UIOP_CLIENT_TRANSPORT_START_REQUEST_START);
-
- // @@ This method should NO longer be required..
-
- /* if (this->client_mesg_factory_->write_protocol_header
- (TAO_PLUGGABLE_MESSAGE_REQUEST,
- output) == 0)
- ACE_THROW (CORBA::MARSHAL ());*/
-}
-
-
-void
-TAO_UIOP_Transport::start_locate (TAO_ORB_Core * /*orb_core*/,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV)
- ACE_THROW_SPEC ((CORBA::SystemException))
-{
- if (this->messaging_object_->generate_locate_request_header (opdetails,
- spec,
- output) == -1)
- ACE_THROW (CORBA::MARSHAL ());
-}
-
-
-CORBA::Boolean
-TAO_UIOP_Transport::send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg)
-{
- // We are going to pass on this request to the underlying messaging
- // layer. It should take care of this request
- if (this->messaging_object_->generate_request_header (opdetails,
- spec,
- msg) == -1)
- return 0;
-
- return 1;
-}
-
int
TAO_UIOP_Transport::messaging_init (CORBA::Octet major,
CORBA::Octet minor)
diff --git a/TAO/tao/Strategies/UIOP_Transport.h b/TAO/tao/Strategies/UIOP_Transport.h
index b95eeec6e89..de7d68b2e1e 100644
--- a/TAO/tao/Strategies/UIOP_Transport.h
+++ b/TAO/tao/Strategies/UIOP_Transport.h
@@ -69,6 +69,8 @@ protected:
virtual ACE_Event_Handler *event_handler_i (void);
+ virtual TAO_Pluggable_Messaging *messaging_object (void);
+
/// Write the complete Message_Block chain to the connection.
virtual ssize_t send_i (const ACE_Message_Block *mblk,
const ACE_Time_Value *s = 0,
@@ -105,25 +107,6 @@ public:
int twoway = 1,
ACE_Time_Value *max_time_wait = 0);
- virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
- virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException));
-
-
- virtual CORBA::Boolean
- send_request_header (TAO_Operation_Details &opdetails,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg);
-
/// Initialising the messaging object
virtual int messaging_init (CORBA::Octet major,
CORBA::Octet minor);
diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp
index 325b65e3945..16f4738c6dc 100644
--- a/TAO/tao/Transport.cpp
+++ b/TAO/tao/Transport.cpp
@@ -11,6 +11,8 @@
#include "Stub.h"
#include "Sync_Strategies.h"
#include "Connection_Handler.h"
+#include "Pluggable_Messaging.h"
+#include "debug.h"
#if !defined (__ACE_INLINE__)
# include "Transport.inl"
@@ -86,6 +88,8 @@ TAO_Transport::~TAO_Transport (void)
delete this->handler_lock_;
}
+
+
ssize_t
TAO_Transport::send_or_buffer (TAO_Stub *stub,
int two_way,
@@ -453,6 +457,50 @@ TAO_Transport::recv (char *buffer,
return this->recv_i (buffer, len, timeout);
}
+int
+TAO_Transport::generate_locate_request (
+ TAO_Target_Specification &spec,
+ TAO_Operation_Details &opdetails,
+ TAO_OutputCDR &output)
+{
+ if (this->messaging_object ()->generate_locate_request_header (opdetails,
+ spec,
+ output) == -1)
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) Error in marshalling the \n")
+ ACE_TEXT ("LocateRequest Header \n")));
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
+int
+TAO_Transport::generate_request_header (
+ TAO_Operation_Details &opdetails,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &output)
+{
+ if (this->messaging_object ()->generate_request_header (opdetails,
+ spec,
+ output) == -1)
+ {
+ if (TAO_debug_level > 0)
+ ACE_DEBUG ((LM_DEBUG,
+ ACE_TEXT ("(%P|%t) Error in marshalling the \n")
+ ACE_TEXT ("LocateRequest Header \n")));
+
+ return -1;
+ }
+
+ return 0;
+}
+
+
long
TAO_Transport::register_for_timer_event (const void* arg,
const ACE_Time_Value &delay,
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index 4feb9dccaed..fcac22c9c4c 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -34,6 +34,7 @@ class TAO_Operation_Details;
class TAO_Transport_Mux_Strategy;
class TAO_Wait_Strategy;
class TAO_Connection_Handler;
+class TAO_Pluggable_Messaging;
#include "ace/Message_Queue.h"
#include "ace/Strategies.h"
@@ -255,10 +256,9 @@ public:
*/
void provide_handle (ACE_Handle_Set &handle_set);
- /// @@ Bala: you must document this function!!
- /// @@ Bala: from the implementation in IIOP_Transport it looks more
- // like it process the list of listening endpoints, or it is
- // parsing it, but 'tearing'???
+ /// Extracts the list of listen points from the <cdr> stream. The
+ /// list would have the protocol specific details of the
+ /// ListenPoints
virtual int tear_listen_point_list (TAO_InputCDR &cdr);
/// Remove all messages from the outgoing queue.
@@ -398,6 +398,10 @@ protected:
// we're trying to lock down! (CJC)
virtual ACE_Event_Handler *event_handler_i (void) = 0;
+ /// Return the messaging object that is used to format the data that
+ /// needs to be sent.
+ virtual TAO_Pluggable_Messaging * messaging_object (void) = 0;
+
/// Write the complete Message_Block chain to the connection.
/**
* Often the implementation simply forwards the arguments to the
@@ -445,32 +449,18 @@ protected:
const ACE_Time_Value *timeout = 0) = 0;
public:
- /// Fill into <output> the right headers to make a request.
- /**
- * @todo Bala: in the good old days it was decided that the
- * pluggable protocol framework would not raise exceptions.
- */
- // @nolock
- virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
-
- /// Fill into <output> the right headers to make a locate request.
- /**
- * @todo Bala: in the good old days it was decided that the
- * pluggable protocol framework would not raise exceptions.
- */
- // @@nolock
- virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Target_Specification &spec,
- TAO_Operation_Details &opdetails,
- TAO_OutputCDR &output,
- CORBA::Environment &ACE_TRY_ENV =
- TAO_default_environment ())
- ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
+
+ /// This is a request for the transport object to write a
+ /// LocateRequest header before it is sent out.
+ int generate_locate_request (TAO_Target_Specification &spec,
+ TAO_Operation_Details &opdetails,
+ TAO_OutputCDR &output);
+
+ /// This is a request for the transport object to write a request
+ /// header before it sends out the request
+ virtual int generate_request_header (TAO_Operation_Details &opd,
+ TAO_Target_Specification &spec,
+ TAO_OutputCDR &msg);
/// Prepare the waiting and demuxing strategy to receive a reply for
/// a new request.
@@ -504,18 +494,7 @@ public:
int twoway,
ACE_Time_Value *max_time_wait) = 0;
- /// This is a request for the transport object to write a request
- /// header before it sends out a request
- /**
- * @todo: Bala shouldn't this be <write_request_header> or maybe
- * <init_request_header>, or <prepare_request_header>? Nothing is
- * really sent at this point, right?
- *
- * @todo: This looks like generic code too.
- */
- virtual CORBA::Boolean send_request_header (TAO_Operation_Details &opd,
- TAO_Target_Specification &spec,
- TAO_OutputCDR &msg) = 0;
+
/// This method formats the stream and then sends the message on the
/// transport.
@@ -627,8 +606,6 @@ public:
void cache_map_entry (
TAO_Transport_Cache_Manager::HASH_MAP_ENTRY *entry);
- // TAO_Transport_Cache_Manager::HASH_MAP_ENTRY *& cache_map_entry (void);
-
void mark_invalid (void);
int make_idle (void);
@@ -697,10 +674,9 @@ protected:
* demarshalling time on the client.
* + On the server side -- once a client that has established the
* connection asks the server to use the connection both ways, we
- * *dont* want the server to go pack service info to the
- * client. That would be *bad*..
- * @@ Bala: what would this be *bad*? Exactly what breaks? The
- * protocol? Some GIOP rules? Performance?
+ * *dont* want the server to pack service info to the client. That
+ * is not allowed. We need a flag to prevent such a things from
+ * happening.
*
* The value of this flag will be 0 if the client sends info and 1
* if the server receives the info.
diff --git a/TAO/tao/Transport.inl b/TAO/tao/Transport.inl
index 53059e65190..48cbed6c5ac 100644
--- a/TAO/tao/Transport.inl
+++ b/TAO/tao/Transport.inl
@@ -1,5 +1,8 @@
// $Id$
+
+
+
ACE_INLINE TAO_ORB_Core *
TAO_Transport::orb_core (void) const
{