summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbala <balanatarajan@users.noreply.github.com>1999-12-28 04:31:06 +0000
committerbala <balanatarajan@users.noreply.github.com>1999-12-28 04:31:06 +0000
commit17a94dd05a0c72b24fca109f69236ec4b6962832 (patch)
tree4d8398b95932abd9731ff8abc2e6203d99351c6b
parentf5267d21bd10f575302559758761bba416508d81 (diff)
downloadATCD-17a94dd05a0c72b24fca109f69236ec4b6962832.tar.gz
*** empty log message ***
-rw-r--r--TAO/tao/Asynch_Invocation.cpp4
-rw-r--r--TAO/tao/GIOP_Message_Factory.cpp11
-rw-r--r--TAO/tao/GIOP_Message_Factory.h6
-rw-r--r--TAO/tao/GIOP_Message_Invocation.cpp32
-rw-r--r--TAO/tao/GIOP_Message_Invocation.h6
-rw-r--r--TAO/tao/IIOP_Transport.cpp17
-rw-r--r--TAO/tao/IIOP_Transport.h11
-rw-r--r--TAO/tao/IOP_Defns.h2
-rw-r--r--TAO/tao/Invocation.cpp21
-rw-r--r--TAO/tao/Invocation.h13
-rw-r--r--TAO/tao/Makefile4
-rw-r--r--TAO/tao/Pluggable.cpp6
-rw-r--r--TAO/tao/Pluggable.h9
-rw-r--r--TAO/tao/Pluggable_Messaging.h8
-rw-r--r--TAO/tao/UIOP_Transport.cpp18
-rw-r--r--TAO/tao/UIOP_Transport.h13
-rw-r--r--TAO/tao/target_identifier.cpp13
-rw-r--r--TAO/tao/target_identifier.h99
-rw-r--r--TAO/tao/target_identifier.i70
19 files changed, 255 insertions, 108 deletions
diff --git a/TAO/tao/Asynch_Invocation.cpp b/TAO/tao/Asynch_Invocation.cpp
index bc8b14430b7..842918bcc2a 100644
--- a/TAO/tao/Asynch_Invocation.cpp
+++ b/TAO/tao/Asynch_Invocation.cpp
@@ -120,8 +120,10 @@ TAO_GIOP_DII_Deferred_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
this->TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
+ TAO_Target_Specification spec;
+ spec.target_specifier (this->profile_->object_key ());
this->transport_->start_request (this->orb_core_,
- this->stub_,
+ spec,
this->out_stream_,
ACE_TRY_ENV);
ACE_CHECK;
diff --git a/TAO/tao/GIOP_Message_Factory.cpp b/TAO/tao/GIOP_Message_Factory.cpp
index d61251fa1a0..f0dff85ed25 100644
--- a/TAO/tao/GIOP_Message_Factory.cpp
+++ b/TAO/tao/GIOP_Message_Factory.cpp
@@ -165,12 +165,11 @@ TAO_GIOP_Client_Message_Factory::handle_input (TAO_Transport *transport,
CORBA::Boolean
TAO_GIOP_Client_Message_Factory::write_request_header (const IOP::ServiceContextList& /*svc_ctx*/,
- CORBA::ULong request_id,
- CORBA::Octet response_flags,
- TAO_Stub */*stub*/,
- const CORBA::Short address_disposition,
- const char */*opname*/,
- TAO_OutputCDR &msg)
+ CORBA::ULong request_id,
+ CORBA::Octet response_flags,
+ TAO_Target_Specification & /*spec*/,
+ const char */*opname*/,
+ TAO_OutputCDR &msg)
{
// Adding only stuff that are common to all versions of GIOP.
// @@ Note: If at any stage we feel that this amount of granularity
diff --git a/TAO/tao/GIOP_Message_Factory.h b/TAO/tao/GIOP_Message_Factory.h
index fa99694564f..7e2c40bb733 100644
--- a/TAO/tao/GIOP_Message_Factory.h
+++ b/TAO/tao/GIOP_Message_Factory.h
@@ -51,15 +51,13 @@ class TAO_Export TAO_GIOP_Client_Message_Factory :
virtual CORBA::Boolean write_request_header (const IOP::ServiceContextList& svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR &msg);
// Write the GIOP request header.
virtual CORBA::Boolean write_locate_request_header (CORBA::ULong request_id,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
TAO_OutputCDR &msg) = 0;
// Write the GIOP locate request header.
diff --git a/TAO/tao/GIOP_Message_Invocation.cpp b/TAO/tao/GIOP_Message_Invocation.cpp
index b097b7a7a96..147517fb593 100644
--- a/TAO/tao/GIOP_Message_Invocation.cpp
+++ b/TAO/tao/GIOP_Message_Invocation.cpp
@@ -96,36 +96,29 @@ CORBA::Boolean
TAO_GIOP_Client_Message_1_1::write_request_header (const IOP::ServiceContextList& svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
const char *opname,
TAO_OutputCDR &msg)
{
// This i sepecific to GIOP 1.1. So put them here
msg << svc_ctx;
-
+
// Let us call our parent class to check what he can do for
// us.
TAO_GIOP_Client_Message_Factory::write_request_header (svc_ctx,
request_id,
response_flags,
- stub,
- address_disposition,
+ spec,
opname,
msg);
// In this case we cannot recognise anything other than the Object
// key as the address disposition variable. But we do a sanity check
- // anyway.
- if (address_disposition == GIOP::KeyAddr)
+ // anyway.
+ const TAO_ObjectKey *key = spec.object_key ();
+ if (key)
{
// Put in the object key
- // Not the right way.. Will blow if Messaging is defined..
- TAO_Profile *profile =
- stub->profile_in_use ();
-
- TAO_ObjectKey *key = profile->_key ();
-
msg << *key;
}
else
@@ -151,8 +144,7 @@ TAO_GIOP_Client_Message_1_1::write_request_header (const IOP::ServiceContextList
CORBA::Boolean
TAO_GIOP_Client_Message_1_1::
write_locate_request_header (CORBA::ULong request_id,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
TAO_OutputCDR &msg)
{
msg << request_id;
@@ -160,15 +152,9 @@ write_locate_request_header (CORBA::ULong request_id,
// In this case we cannot recognise anything other than the Object
// key as the address disposition variable. But we do a sanity check
// anyway.
- if (address_disposition == GIOP::KeyAddr)
+ const TAO_ObjectKey *key = spec.object_key ();
+ if (key)
{
- // Put in the object key
- // Not the right way.. Will blow if Messaging is defined..
- TAO_Profile *profile =
- stub->profile_in_use ();
-
- TAO_ObjectKey *key = profile->_key ();
-
// Everything is fine
msg << *key;
}
diff --git a/TAO/tao/GIOP_Message_Invocation.h b/TAO/tao/GIOP_Message_Invocation.h
index 7dc6c2f5817..569ce305400 100644
--- a/TAO/tao/GIOP_Message_Invocation.h
+++ b/TAO/tao/GIOP_Message_Invocation.h
@@ -46,15 +46,13 @@ public:
write_request_header (const IOP::ServiceContextList& svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
const char *opname,
TAO_OutputCDR &msg);
// Writes the rquest header.
CORBA::Boolean write_locate_request_header (CORBA::ULong request_id,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
TAO_OutputCDR &msg);
// Write the locate request header
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index 0b0c132ad6e..bd704d783d2 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -142,7 +142,7 @@ TAO_IIOP_Client_Transport::client_handler (void)
void
TAO_IIOP_Client_Transport::start_request (TAO_ORB_Core */*orb_core*/,
- TAO_Stub * /*stub*/,
+ TAO_Target_Specification & /*spec */,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
@@ -165,8 +165,7 @@ TAO_IIOP_Client_Transport::start_request (TAO_ORB_Core */*orb_core*/,
void
TAO_IIOP_Client_Transport::start_locate (TAO_ORB_Core */*orb_core*/,
- TAO_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
CORBA::ULong request_id,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV)
@@ -190,8 +189,7 @@ TAO_IIOP_Client_Transport::start_locate (TAO_ORB_Core */*orb_core*/,
if (this->client_mesg_factory_->write_locate_request_header (request_id,
- stub,
- address_disposition,
+ spec,
output) == 0)
ACE_THROW (CORBA::MARSHAL ());
}
@@ -331,8 +329,7 @@ CORBA::Boolean
TAO_IIOP_Client_Transport::send_request_header (const IOP::ServiceContextList & svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR & msg)
{
@@ -342,8 +339,7 @@ TAO_IIOP_Client_Transport::send_request_header (const IOP::ServiceContextList &
this->client_mesg_factory_->write_request_header (svc_ctx,
request_id,
response_flags,
- stub,
- address_disposition,
+ spec,
opname,
msg);
@@ -427,8 +423,7 @@ CORBA::Boolean
TAO_IIOP_Transport::send_request_header (const IOP::ServiceContextList & /*svc_ctx*/,
CORBA::ULong /*request_id*/,
CORBA::Octet /*response_flags*/,
- TAO_Stub * /*stub*/,
- const CORBA::Short /*address_disposition*/,
+ TAO_Target_Specification & /*spec */ ,
const char* /*opname*/,
TAO_OutputCDR & /*msg*/)
{
diff --git a/TAO/tao/IIOP_Transport.h b/TAO/tao/IIOP_Transport.h
index 401cc18b5cc..45e118278f0 100644
--- a/TAO/tao/IIOP_Transport.h
+++ b/TAO/tao/IIOP_Transport.h
@@ -85,8 +85,7 @@ public:
send_request_header (const IOP::ServiceContextList &svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR &msg);
@@ -122,14 +121,13 @@ public:
// = The TAO_Transport methods, please check the documentation in
// "tao/Pluggable.h" for more details.
virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Stub *stub,
+ 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_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
CORBA::ULong request_id,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
@@ -149,8 +147,7 @@ public:
send_request_header (const IOP::ServiceContextList &svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR &msg);
diff --git a/TAO/tao/IOP_Defns.h b/TAO/tao/IOP_Defns.h
index da83220b9d5..3af5f067519 100644
--- a/TAO/tao/IOP_Defns.h
+++ b/TAO/tao/IOP_Defns.h
@@ -1,5 +1,5 @@
// $Id$
-
+//-*- C++ -*-
// ============================================================================
//
// = LIBRARY
diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp
index bac5d6e0bb6..117bc59c8a2 100644
--- a/TAO/tao/Invocation.cpp
+++ b/TAO/tao/Invocation.cpp
@@ -14,6 +14,7 @@
#include "tao/Messaging_Policy_i.h"
#include "tao/Client_Priority_Policy.h"
+#include "tao/target_identifier.h"
#if !defined (__ACE_INLINE__)
# include "tao/Invocation.i"
@@ -331,11 +332,13 @@ TAO_GIOP_Invocation::prepare_header (CORBA::Octet response_flags,
// unverified user ID, and then verifying the message (i.e. a dummy
// service context entry is set up to hold a digital signature for
// this message, then patched shortly before it's sent).
+ TAO_Target_Specification spec;
+ spec.target_specifier (this->profile_->object_key ());
+
if (this->transport_->send_request_header (this->service_info_,
this->request_id_,
response_flags,
- this->stub_,
- TAO_GIOP_Invocation::Key_Addr,
+ spec,
this->opname_,
this->out_stream_) == 0)
ACE_THROW (CORBA::MARSHAL ());
@@ -550,8 +553,10 @@ TAO_GIOP_Twoway_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
this->TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
+ TAO_Target_Specification spec;
+ spec.target_specifier (this->profile_->object_key ());
this->transport_->start_request (this->orb_core_,
- this->stub_,
+ spec,
this->out_stream_,
ACE_TRY_ENV);
}
@@ -943,8 +948,11 @@ TAO_GIOP_Oneway_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
this->TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
+ TAO_Target_Specification spec;
+ spec.target_specifier (this->profile_->object_key ());
+
this->transport_->start_request (this->orb_core_,
- this->stub_,
+ spec,
this->out_stream_,
ACE_TRY_ENV);
}
@@ -1144,9 +1152,10 @@ TAO_GIOP_Locate_Request_Invocation::start (CORBA::Environment &ACE_TRY_ENV)
this->TAO_GIOP_Invocation::start (ACE_TRY_ENV);
ACE_CHECK;
+ TAO_Target_Specification spec;
+ spec.target_specifier (this->profile_->object_key ());
this->transport_->start_locate (this->orb_core_,
- this->stub_,
- TAO_GIOP_Invocation::Key_Addr,
+ spec,
this->request_id_,
this->out_stream_,
ACE_TRY_ENV);
diff --git a/TAO/tao/Invocation.h b/TAO/tao/Invocation.h
index 951c15b0154..e398337c0d4 100644
--- a/TAO/tao/Invocation.h
+++ b/TAO/tao/Invocation.h
@@ -82,19 +82,6 @@ public:
// they want to. All the synchronous invocations <idle> the
// Transport, but asynchronous invocations do not do that.
- enum TAO_Target_Address
- {
- Key_Addr = 0,
- Profile_Addr,
- Reference_Addr
- };
- // This enum is basically a equivalent of the addressing mechanism
- // as defined by the GIOP classes. As things would be bad to get the
- // GIOP specific details in to this class, we have this enum. Now it
- // would like all the Messaging layers can hack on this addressing
- // scheme. This would also prevent magic numbers to float around and
- // this is the our main aim.
-
void prepare_header (CORBA::Octet response_flags,
CORBA_Environment &ACE_TRY_ENV =
TAO_default_environment ())
diff --git a/TAO/tao/Makefile b/TAO/tao/Makefile
index f41b6735769..0fc0a4e1c61 100644
--- a/TAO/tao/Makefile
+++ b/TAO/tao/Makefile
@@ -85,8 +85,8 @@ GIOP_Message_Invocation \
GIOP_Utils \
GIOP_Acceptors \
GIOP_Assorted_Headers \
-GIOP_Server_Request
-
+GIOP_Server_Request \
+target_identifier
DEFAULT_RESOURCES_FILES = \
default_client \
default_server \
diff --git a/TAO/tao/Pluggable.cpp b/TAO/tao/Pluggable.cpp
index 07a64104264..4d98bdbb2df 100644
--- a/TAO/tao/Pluggable.cpp
+++ b/TAO/tao/Pluggable.cpp
@@ -11,6 +11,7 @@
#include "tao/debug.h"
#include "ace/ACE.h"
+#include "tao/target_identifier.h"
#if !defined (__ACE_INLINE__)
# include "tao/Pluggable.i"
@@ -217,7 +218,7 @@ TAO_Transport::leader_follower_condition_variable (void)
void
TAO_Transport::start_request (TAO_ORB_Core *,
- TAO_Stub * ,
+ TAO_Target_Specification & /*spec */,
TAO_OutputCDR &,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
@@ -227,8 +228,7 @@ TAO_Transport::start_request (TAO_ORB_Core *,
void
TAO_Transport::start_locate (TAO_ORB_Core *,
- TAO_Stub * /*stub*/,
- const short ,
+ TAO_Target_Specification & /*spec */,
CORBA::ULong,
TAO_OutputCDR &,
CORBA::Environment &ACE_TRY_ENV)
diff --git a/TAO/tao/Pluggable.h b/TAO/tao/Pluggable.h
index 0ff2b41c758..5bc1d6dd2e8 100644
--- a/TAO/tao/Pluggable.h
+++ b/TAO/tao/Pluggable.h
@@ -46,6 +46,7 @@ class TAO_Transport_Mux_Strategy;
class TAO_Wait_Strategy;
class TAO_Pluggable_Message_Factory;
+class TAO_Target_Specification;
typedef ACE_Message_Queue<ACE_NULL_SYNCH> TAO_Transport_Buffering_Queue;
@@ -109,7 +110,7 @@ public:
virtual void start_request (TAO_ORB_Core *orb_core,
- TAO_Stub *stub,
+ TAO_Target_Specification &spec,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV =
TAO_default_environment ())
@@ -117,8 +118,7 @@ public:
// Fill into <output> the right headers to make a request.
virtual void start_locate (TAO_ORB_Core *orb_core,
- TAO_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
CORBA::ULong request_id,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV =
@@ -141,8 +141,7 @@ public:
send_request_header (const IOP::ServiceContextList &svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR &msg) = 0;
// This is a request for the transport object to write a request
diff --git a/TAO/tao/Pluggable_Messaging.h b/TAO/tao/Pluggable_Messaging.h
index 1eb7acf7b8a..a9506ba7336 100644
--- a/TAO/tao/Pluggable_Messaging.h
+++ b/TAO/tao/Pluggable_Messaging.h
@@ -18,8 +18,10 @@
// ============================================================================
#ifndef _TAO_PLUGGABLE_MESSAGE_H_
#define _TAO_PLUGGABLE_MESSAGE_H_
+
#include "tao/corbafwd.h"
#include "tao/Pluggable.h"
+#include "tao/target_identifier.h"
class TAO_Message_State_Factory;
@@ -64,16 +66,14 @@ public:
virtual CORBA::Boolean write_request_header (const IOP::ServiceContextList& svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR &msg) = 0;
// Write the GIOP request header.
virtual CORBA::Boolean write_locate_request_header (CORBA::ULong request_id,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
TAO_OutputCDR &msg) = 0;
// Write the GIOP locate request header.
diff --git a/TAO/tao/UIOP_Transport.cpp b/TAO/tao/UIOP_Transport.cpp
index 581ec29a25b..dec7c4f4348 100644
--- a/TAO/tao/UIOP_Transport.cpp
+++ b/TAO/tao/UIOP_Transport.cpp
@@ -140,7 +140,7 @@ TAO_UIOP_Client_Transport::client_handler (void)
void
TAO_UIOP_Client_Transport::start_request (TAO_ORB_Core */*orb_core*/,
- const TAO_Profile* /*pfile*/,
+ TAO_Target_Specification & /*spec*/,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV)
ACE_THROW_SPEC ((CORBA::SystemException))
@@ -159,8 +159,7 @@ TAO_UIOP_Client_Transport::start_request (TAO_ORB_Core */*orb_core*/,
void
TAO_UIOP_Client_Transport::start_locate (TAO_ORB_Core * /*orb_core*/,
- TAO_Stub *stub,
- const short add_dis,
+ TAO_Target_Specification &spec,
CORBA::ULong request_id,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV)
@@ -180,12 +179,12 @@ TAO_UIOP_Client_Transport::start_locate (TAO_ORB_Core * /*orb_core*/,
if (this->client_mesg_factory_->write_locate_request_header (request_id,
- stub,
- add_dis,
+ spec,
output) == 0)
ACE_THROW (CORBA::MARSHAL ());
}
+
int
TAO_UIOP_Client_Transport::send_request (TAO_Stub *stub,
TAO_ORB_Core *orb_core,
@@ -323,8 +322,7 @@ CORBA::Boolean
TAO_UIOP_Client_Transport::send_request_header (const IOP::ServiceContextList & svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const CORBA::Short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR & msg)
{
@@ -334,8 +332,7 @@ TAO_UIOP_Client_Transport::send_request_header (const IOP::ServiceContextList &
this->client_mesg_factory_->write_request_header (svc_ctx,
request_id,
response_flags,
- stub,
- address_disposition,
+ spec,
opname,
msg);
return retval;
@@ -414,8 +411,7 @@ CORBA::Boolean
TAO_UIOP_Transport::send_request_header (const IOP::ServiceContextList & /*svc_ctx*/,
CORBA::ULong /*request_id*/,
CORBA::Octet /*response_flags*/,
- TAO_Stub * /*stub*/,
- const CORBA::Short /*address_disposition*/,
+ TAO_Target_Specification & /*spec*/,
const char* /*opname*/,
TAO_OutputCDR & /*msg*/)
{
diff --git a/TAO/tao/UIOP_Transport.h b/TAO/tao/UIOP_Transport.h
index 7c5c10d81ec..eff2e94266b 100644
--- a/TAO/tao/UIOP_Transport.h
+++ b/TAO/tao/UIOP_Transport.h
@@ -25,6 +25,7 @@
// BALA Temporrary inclusion
#include "tao/Pluggable_Messaging.h"
#include "tao/GIOP_Utils.h"
+#include "tao/target_identifier.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
@@ -89,8 +90,7 @@ public:
send_request_header (const IOP::ServiceContextList &svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR &msg);
@@ -131,18 +131,18 @@ public:
// = The TAO_Transport methods, please check the documentation in
// "tao/Pluggable.h" for more details.
virtual void start_request (TAO_ORB_Core *orb_core,
- const TAO_Profile *profile,
+ 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_Stub *stub,
- const short addressing_disposition,
+ TAO_Target_Specification &spec,
CORBA::ULong request_id,
TAO_OutputCDR &output,
CORBA::Environment &ACE_TRY_ENV = TAO_default_environment ())
ACE_THROW_SPEC ((CORBA::SystemException));
+
virtual int send_request (TAO_Stub *stub,
TAO_ORB_Core *orb_core,
TAO_OutputCDR &stream,
@@ -158,8 +158,7 @@ public:
send_request_header (const IOP::ServiceContextList &svc_ctx,
CORBA::ULong request_id,
CORBA::Octet response_flags,
- TAO_Stub *stub,
- const short address_disposition,
+ TAO_Target_Specification &spec,
const char* opname,
TAO_OutputCDR &msg);
diff --git a/TAO/tao/target_identifier.cpp b/TAO/tao/target_identifier.cpp
new file mode 100644
index 00000000000..eca96906319
--- /dev/null
+++ b/TAO/tao/target_identifier.cpp
@@ -0,0 +1,13 @@
+//$Id$
+#include "tao/target_identifier.h"
+
+#if !defined (__ACE_INLINE__)
+#include "target_identfier.i"
+#endif /* !defined INLINE */
+
+TAO_Target_Specification::TAO_Target_Specification (void)
+ :specifier_ (TAO_Target_Specification::Key_Addr),
+ profile_index_ (0)
+{
+ //no-op
+}
diff --git a/TAO/tao/target_identifier.h b/TAO/tao/target_identifier.h
new file mode 100644
index 00000000000..cc77f3f6be1
--- /dev/null
+++ b/TAO/tao/target_identifier.h
@@ -0,0 +1,99 @@
+//-*- C++ -*-
+// $Id$
+
+// ============================================================================
+//
+// = LIBRARY
+// TAO
+//
+// = FILENAME
+// target_identifier.h
+//
+// = DESCRIPTION
+// A class that encapsulates the target identification details.
+//
+//
+// = AUTHOR
+// Balachandran Natarajan <bala@cs.wustl.edu>
+// ============================================================================
+#ifndef _TAO_TARGET_SPECIFICATION_H_
+#define _TAO_TARGET_SPECIFICATION_H_
+#include "tao/Object_KeyC.h"
+#include "tao/IOPC.h"
+
+
+class TAO_Target_Specification
+{
+ // = TITLE
+ // A class to encapsulate all the ways of specifying targets.
+ //
+ // = DESCRIPTION
+ // This is a sort of auxillary class. The motivation behind this
+ // is GIOP 1.2 althought I foresee other messaging protocols doing
+ // something similar. The Invocation classes (client side) were
+ // passing the object key that they had extracted from the
+ // profiles with every invocation. This extraction would be done
+ // based on the policies that are specified for the client side
+ // ORB. Further the client side ORB need not just send the object
+ // key. They can send send the IOP::TaggedProfile or IOP::IOR
+ // profile. So I am putting these possibilites in this class and
+ // pass it to the messaging layer. It would extract what is
+ // required.
+public:
+
+ TAO_Target_Specification (void);
+ // Ctor
+ enum TAO_Target_Address
+ {
+ // Note that this could be extended for other protocols
+ Key_Addr = 0,
+ Profile_Addr,
+ Reference_Addr
+ };
+
+ void target_specifier (const TAO_ObjectKey &key);
+ void target_specifier (IOP::TaggedProfile *profile);
+ void target_specifier (IOP::IOR *ior,
+ CORBA::ULong prof_index);
+ // Specification of targets
+
+ const TAO_ObjectKey* object_key (void);
+ // Returns the object key after a check of the stored specifier. If
+ // the stored specifier is not of the right type then this would
+ // return a NULL
+
+ const IOP::TaggedProfile *profile (void);
+ // Returns the IOP::TaggedProfile after a check of the stored specifier. If
+ // the stored specifier is not of the right type then this would
+ // return a NULL
+
+ const CORBA::ULong iop_ior (IOP::IOR *ior);
+ // Returns a pointer to IOP::IOR through the parameters and the
+ // index of the selected profile as a return parameter after a check
+ // of the stored specifier. If the stored specifier is not of the
+ // right type then this would return a NULL.
+
+ TAO_Target_Address specifier (void);
+ // Access the TArget_Address specifier
+
+private:
+ union
+ {
+ TAO_ObjectKey *object_key_;
+ IOP::TaggedProfile *profile_;
+ IOP::IOR *ior_;
+ } u_;
+ // The union of all the possibilities
+
+ TAO_Target_Address specifier_;
+ // The enum identifier
+
+ CORBA::ULong profile_index_;
+ // The profile index
+};
+
+#if defined (__ACE_INLINE__)
+#include "target_identifier.i"
+#endif /* defined INLINE */
+
+#endif /*_TAO_TARGET_SPECIFICATION_H_ */
diff --git a/TAO/tao/target_identifier.i b/TAO/tao/target_identifier.i
new file mode 100644
index 00000000000..1358b474db2
--- /dev/null
+++ b/TAO/tao/target_identifier.i
@@ -0,0 +1,70 @@
+//$Id$
+
+
+ACE_INLINE void
+TAO_Target_Specification::target_specifier (const TAO_ObjectKey &key)
+{
+ this->specifier_ = TAO_Target_Specification::Key_Addr;
+ this->u_.object_key_ = ACE_const_cast (TAO_ObjectKey *,
+ &key);
+}
+
+ACE_INLINE void
+TAO_Target_Specification::target_specifier (IOP::TaggedProfile *profile)
+
+{
+ if (profile)
+ {
+ this->specifier_ = TAO_Target_Specification::Profile_Addr;
+ this->u_.profile_ = profile;
+ }
+}
+
+ACE_INLINE void
+TAO_Target_Specification::target_specifier (IOP::IOR *ior,
+ CORBA::ULong prof_index)
+{ if (ior)
+ {
+ this->specifier_ = TAO_Target_Specification::Reference_Addr;
+ this->u_.ior_ = ior;
+ this->profile_index_ = prof_index;
+ }
+}
+
+ACE_INLINE const TAO_ObjectKey*
+TAO_Target_Specification::object_key (void)
+{
+ if (this->specifier_ == TAO_Target_Specification::Key_Addr)
+ return this->u_.object_key_;
+
+ return 0;
+}
+
+ACE_INLINE const IOP::TaggedProfile *
+TAO_Target_Specification::profile (void)
+{
+ if (this->specifier_ == TAO_Target_Specification::Profile_Addr)
+ return this->u_.profile_;
+
+ return 0;
+}
+
+ACE_INLINE const CORBA::ULong
+TAO_Target_Specification::iop_ior (IOP::IOR *ior)
+{
+ if (this->specifier_ == TAO_Target_Specification::Reference_Addr)
+ {
+ ior = this->u_.ior_;
+ return this->profile_index_;
+ }
+
+ ior = 0;
+ return 0;
+}
+
+ACE_INLINE TAO_Target_Specification::TAO_Target_Address
+TAO_Target_Specification::specifier (void)
+{
+ return this->specifier_;
+}
+