From 3e5745277661340da58eedc16b007b288e0feb3a Mon Sep 17 00:00:00 2001 From: nanbor Date: Thu, 26 Aug 1999 06:53:50 +0000 Subject: *** empty log message *** --- TAO/ChangeLog-99c | 23 ++++++++++++++++++++-- TAO/tao/GIOP_Server_Request.h | 4 ++-- TAO/tao/GIOP_Server_Request.i | 6 +++--- TAO/tao/Interceptor.pidl | 2 +- TAO/tao/InterceptorC.cpp | 2 +- TAO/tao/InterceptorC.h | 2 +- TAO/tao/InterceptorS.h | 1 + TAO/tao/Invocation.h | 2 +- TAO/tao/Invocation.i | 4 ++-- TAO/tao/ORB.h | 24 ++++++++++++++++++++++ TAO/tao/ORB.i | 46 +++++++++++++++++++++++++++++++++++++++++++ TAO/tao/POA.h | 3 --- TAO/tao/Reply_Dispatcher.h | 4 ++-- TAO/tao/Reply_Dispatcher.i | 4 ++-- TAO/tao/Server_Request.h | 4 ++-- 15 files changed, 109 insertions(+), 22 deletions(-) diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index b3165f5d42d..ce8f5e77c1a 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,9 +1,28 @@ -Wed Aug 25 16:49:08 1999 Nanbor Wang +Thu Aug 26 01:49:49 1999 Nanbor Wang + + * tao/GIOP_Server_Request.h: + * tao/GIOP_Server_Request.i: + * tao/Interceptor.pidl: + * tao/InterceptorC.cpp: + * tao/InterceptorC.h: + * tao/InterceptorS.h: + * tao/Invocation.h: + * tao/Invocation.i: + * tao/ORB.h: + * tao/ORB.i: + * tao/POA.h: + * tao/Reply_Dispatcher.h: + * tao/Reply_Dispatcher.i: + * tao/Server_Request.h: + +Wed Aug 25 23:38:32 1999 Nanbor Wang + + * tao/POA.h: Removed duplicated inclusion of Object_Adapter.h. * TAO_IDL/be/be_codegen.cpp: Let *C.cpp include *S.h when generating LC objref. - * TAO_IDL/be/be_helper.cpp: Added the RCS $Id$ keyword in the + * TAO_IDL/be/be_helper.cpp: Added the RCS $_Id_$ tag in the first line of copyright info so it's easier to check in generated files. diff --git a/TAO/tao/GIOP_Server_Request.h b/TAO/tao/GIOP_Server_Request.h index 1bfd5a9f6fd..6b1a63b068a 100644 --- a/TAO/tao/GIOP_Server_Request.h +++ b/TAO/tao/GIOP_Server_Request.h @@ -130,8 +130,8 @@ public: virtual const TAO_ObjectKey &object_key (void) const; - virtual const IOP::ServiceContextList &request_service_info (void) const; - virtual const IOP::ServiceContextList &reply_service_info (void); + virtual IOP::ServiceContextList &request_service_info (void); + virtual IOP::ServiceContextList &reply_service_info (void); // The pseudo object methods, not really needed because the class is // not in the spec, but we add them for the sake of completeness. diff --git a/TAO/tao/GIOP_Server_Request.i b/TAO/tao/GIOP_Server_Request.i index 8cd25365216..d58fe6508d9 100644 --- a/TAO/tao/GIOP_Server_Request.i +++ b/TAO/tao/GIOP_Server_Request.i @@ -65,13 +65,13 @@ TAO_GIOP_ServerRequest::object_key (void) const return this->object_key_; } -ACE_INLINE const IOP::ServiceContextList & -TAO_GIOP_ServerRequest::request_service_info (void) const +ACE_INLINE IOP::ServiceContextList & +TAO_GIOP_ServerRequest::request_service_info (void) { return this->request_service_info_; } -ACE_INLINE const IOP::ServiceContextList & +ACE_INLINE IOP::ServiceContextList & TAO_GIOP_ServerRequest::reply_service_info (void) { return this->reply_service_info_; diff --git a/TAO/tao/Interceptor.pidl b/TAO/tao/Interceptor.pidl index 6d7fc74dee7..012219aa1c5 100644 --- a/TAO/tao/Interceptor.pidl +++ b/TAO/tao/Interceptor.pidl @@ -1,4 +1,4 @@ -// $Id$ +// -*- IDL -*- $Id$ // This file contains the interface definitions for "Portable" // Interceptor support. diff --git a/TAO/tao/InterceptorC.cpp b/TAO/tao/InterceptorC.cpp index e044aa0509f..d7c959033f4 100644 --- a/TAO/tao/InterceptorC.cpp +++ b/TAO/tao/InterceptorC.cpp @@ -8,8 +8,8 @@ // http://www.cs.wustl.edu/~schmidt/TAO.html #include "InterceptorC.h" - #include "InterceptorS.h" +#include "tao/Any.h" #if !defined (__ACE_INLINE__) #include "InterceptorC.i" diff --git a/TAO/tao/InterceptorC.h b/TAO/tao/InterceptorC.h index 537618aeab7..f5c7bc6f0ee 100644 --- a/TAO/tao/InterceptorC.h +++ b/TAO/tao/InterceptorC.h @@ -10,7 +10,7 @@ #ifndef _TAO_IDL_INTERCEPTORC_H_ #define _TAO_IDL_INTERCEPTORC_H_ -#include "tao/corba.h" +#include "tao/IOPC.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once diff --git a/TAO/tao/InterceptorS.h b/TAO/tao/InterceptorS.h index 82b4bf91805..e290271ffe9 100644 --- a/TAO/tao/InterceptorS.h +++ b/TAO/tao/InterceptorS.h @@ -12,6 +12,7 @@ #include "InterceptorC.h" +#include "tao/Servant_Base.h" #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once diff --git a/TAO/tao/Invocation.h b/TAO/tao/Invocation.h index bc07c30f2a3..158e46d1ea7 100644 --- a/TAO/tao/Invocation.h +++ b/TAO/tao/Invocation.h @@ -219,7 +219,7 @@ public: TAO_default_environment ()); // No CORBA::Context support (deprecated). - const IOP::ServiceContextList& reply_service_info (void) const; + IOP::ServiceContextList& reply_service_info (void); // Accessor to the reply ServiceContextList. TAO_InputCDR &inp_stream (void); diff --git a/TAO/tao/Invocation.i b/TAO/tao/Invocation.i index d298c178c95..c65c7a90a14 100644 --- a/TAO/tao/Invocation.i +++ b/TAO/tao/Invocation.i @@ -35,8 +35,8 @@ TAO_GIOP_Twoway_Invocation (TAO_Stub *stub, { } -ACE_INLINE const IOP::ServiceContextList & -TAO_GIOP_Twoway_Invocation::reply_service_info (void) const +ACE_INLINE IOP::ServiceContextList & +TAO_GIOP_Twoway_Invocation::reply_service_info (void) { return this->rd_.reply_service_info (); } diff --git a/TAO/tao/ORB.h b/TAO/tao/ORB.h index 38417465cb6..657b7b4f693 100644 --- a/TAO/tao/ORB.h +++ b/TAO/tao/ORB.h @@ -31,6 +31,9 @@ #include "tao/Services.h" #include "tao/IORManipulation.h" +// Interceptor definitions. +#include "tao/InterceptorC.h" + // IRIX needs this for the throw specs #include "tao/PolicyC.h" @@ -379,6 +382,23 @@ public: CORBA_Environment &ACE_TRY_ENV = TAO_default_environment () ); #endif /* TAO_HAS_VALUETYPE */ + // = Interceptor registration routine + // Currently, we only support one interceptor per-ORB. + + PortableInterceptor::ClientRequestInterceptor_ptr _register_client_interceptor + (PortableInterceptor::ClientRequestInterceptor_ptr ci, + CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); + + PortableInterceptor::ServerRequestInterceptor_ptr _register_server_interceptor + (PortableInterceptor::ServerRequestInterceptor_ptr ci, + CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); + + PortableInterceptor::ClientRequestInterceptor_ptr _get_client_interceptor + (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); + + PortableInterceptor::ServerRequestInterceptor_ptr _get_server_interceptor + (CORBA_Environment &ACE_TRY_ENV = TAO_default_environment ()); + #if !defined (TAO_HAS_MINIMUM_CORBA) // Typedefs for CORBA_ORB_RequestSeq, @@ -744,6 +764,10 @@ private: // If non-0 then this is the Factory for OBV unmarshaling #endif /* TAO_HAS_VALUETYPE */ + PortableInterceptor::ClientRequestInterceptor_var client_interceptor_; + PortableInterceptor::ServerRequestInterceptor_var server_interceptor_; + // Interceptor registries. + TAO_IOR_LookupTable lookup_table_; // Table of ObjectID->IOR mappings. diff --git a/TAO/tao/ORB.i b/TAO/tao/ORB.i index 27bf4fc602a..ff56440fcd1 100644 --- a/TAO/tao/ORB.i +++ b/TAO/tao/ORB.i @@ -315,6 +315,52 @@ CORBA_ORB::orb_core (void) const return this->orb_core_; } +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr +CORBA_ORB::_register_client_interceptor + (PortableInterceptor::ClientRequestInterceptor_ptr ci, + CORBA_Environment &ACE_TRY_ENV) +{ + if (ci->_is_a ("IDL:TAO/PortableInterceptor/ClientRequestInterceptor:1.0")) + { + PortableInterceptor::ClientRequestInterceptor_var oci = + PortableInterceptor::ClientRequestInterceptor::_duplicate (this->client_interceptor_); + this->client_interceptor_ = ci; + return oci._retn (); + } + else + ACE_THROW_RETURN (CORBA::INV_OBJREF (), 0); +} + +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr +CORBA_ORB::_register_server_interceptor + (PortableInterceptor::ServerRequestInterceptor_ptr ci, + CORBA_Environment &ACE_TRY_ENV) +{ + if (ci->_is_a ("IDL:TAO/PortableInterceptor/ServerRequestInterceptor:1.0")) + { + PortableInterceptor::ServerRequestInterceptor_var oci = + PortableInterceptor::ServerRequestInterceptor::_duplicate (this->server_interceptor_); + this->server_interceptor_ = ci; + return oci._retn (); + } + else + ACE_THROW_RETURN (CORBA::INV_OBJREF (), 0); +} + +ACE_INLINE PortableInterceptor::ClientRequestInterceptor_ptr +CORBA_ORB::_get_client_interceptor (CORBA_Environment &) +{ + return + PortableInterceptor::ClientRequestInterceptor::_duplicate (this->client_interceptor_); +} + +ACE_INLINE PortableInterceptor::ServerRequestInterceptor_ptr +CORBA_ORB::_get_server_interceptor (CORBA_Environment &ACE_TRY_ENV) +{ + return + PortableInterceptor::ServerRequestInterceptor::_duplicate (this->server_interceptor_); +} + // ************************************************************ // These are in CORBA namespace // ************************************************************ diff --git a/TAO/tao/POA.h b/TAO/tao/POA.h index 5485576e0a3..98b4459811d 100644 --- a/TAO/tao/POA.h +++ b/TAO/tao/POA.h @@ -45,9 +45,6 @@ // POA Manager #include "tao/POAManager.h" -// Object Adapter -#include "tao/Object_Adapter.h" - // This is to remove "inherits via dominance" warnings from MSVC. // MSVC is being a little too paranoid. #if defined (_MSC_VER) diff --git a/TAO/tao/Reply_Dispatcher.h b/TAO/tao/Reply_Dispatcher.h index 8b3dae7fbc9..bb30fa7152c 100644 --- a/TAO/tao/Reply_Dispatcher.h +++ b/TAO/tao/Reply_Dispatcher.h @@ -56,7 +56,7 @@ public: virtual TAO_GIOP_Message_State *message_state (void); // Get the Message State into which the reply has been read. - const IOP::ServiceContextList& reply_service_info () const; + IOP::ServiceContextList& reply_service_info (); // Accessing the reply service context list. virtual int leader_follower_condition_variable (TAO_Transport *); @@ -141,7 +141,7 @@ private: // ********************************************************************* -#if defined (TAO_HAS_CORBA_MESSAGING) +#if defined (TAO_HAS_CORBA_MESSAGING) # if defined (TAO_HAS_AMI_CALLBACK) || defined (TAO_HAS_AMI_POLLER) diff --git a/TAO/tao/Reply_Dispatcher.i b/TAO/tao/Reply_Dispatcher.i index 9ad5594b1da..b41eb0125e6 100644 --- a/TAO/tao/Reply_Dispatcher.i +++ b/TAO/tao/Reply_Dispatcher.i @@ -1,7 +1,7 @@ // $Id$ -ACE_INLINE const IOP::ServiceContextList& -TAO_Reply_Dispatcher::reply_service_info (void) const +ACE_INLINE IOP::ServiceContextList& +TAO_Reply_Dispatcher::reply_service_info (void) { return this->reply_service_info_; } diff --git a/TAO/tao/Server_Request.h b/TAO/tao/Server_Request.h index 700c5b5ce55..59c1086424e 100644 --- a/TAO/tao/Server_Request.h +++ b/TAO/tao/Server_Request.h @@ -163,8 +163,8 @@ public: TAO_default_environment ()) = 0; // Start a Reply message. - virtual const IOP::ServiceContextList &request_service_info (void) const = 0; - virtual const IOP::ServiceContextList &reply_service_info (void) = 0; + virtual IOP::ServiceContextList &request_service_info (void) = 0; + virtual IOP::ServiceContextList &reply_service_info (void) = 0; // Accessor to the underlying ServiceContextList for request/reply // message. -- cgit v1.2.1