Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ImR_Forwarder Class Reference

Implementation Repository Forwarder. More...

#include <Forwarder.h>

Inheritance diagram for ImR_Forwarder

Inheritance graph
[legend]
Collaboration diagram for ImR_Forwarder:

Collaboration graph
[legend]
List of all members.

Public Methods

 ImR_Forwarder (ImplRepo_i *ir_impl)
 Constructor. More...

virtual PortableServer::Servant preinvoke ( const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa, const char * operation, PortableServer::ServantLocator::Cookie &cookie TAO_ENV_ARG_DECL ) throw (CORBA::SystemException, PortableServer::ForwardRequest)
 Called before the invocation begins. More...

virtual void postinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa, const char * operation, PortableServer::ServantLocator::Cookie cookie, PortableServer::Servant servant TAO_ENV_ARG_DECL) throw (CORBA::SystemException)
 Called after the invocation finishes. More...


Private Attributes

ImplRepo_iimr_impl_
 Where we find out where to forward to.

PortableServer::Current_var poa_current_var_
 POA reference.


Detailed Description

Implementation Repository Forwarder.

This class is provides a ServantLocator implementation that is used to handle arbitrary calls and forward them to the correct place.


Constructor & Destructor Documentation

ImR_Forwarder::ImR_Forwarder ( ImplRepo_i * ir_impl )
 

Constructor.

This constructor takes in orb and ImplRepo_i pointers to store for later use. It also grabs a reference to the POACurrent object for use in preinvoke.


Member Function Documentation

void ImR_Forwarder::postinvoke ( const PortableServer::ObjectId & oid,
PortableServer::POA_ptr poa,
const char * operation,
PortableServer::ServantLocator::Cookie cookie,
PortableServer::Servant servant TAO_ENV_ARG_DECL ) throw (CORBA::SystemException) [virtual]
 

Called after the invocation finishes.

The postinvoke method just deletes the passed in servant.

PortableServer::Servant ImR_Forwarder::preinvoke ( const PortableServer::ObjectId & oid,
PortableServer::POA_ptr poa,
const char * operation,
Cookie & cookie ) throw (CORBA::SystemException, PortableServer::ForwardRequest) [virtual]
 

Called before the invocation begins.

We figure out the intended recipient from the POA name. After activating the server, we throw a forwarding exception to the correct server.

The big complicated thing here is that we have to create the forwarding ior based on what we already have. So we combine the endpoint received from activate_server_i and append the objectid from the request to it.

Todo:
Should we base the name on the entire POA hierarchy?

Use ACE_TString for the IOR? Can it always be a char?


Member Data Documentation

ImplRepo_i * ImR_Forwarder::imr_impl_ [private]
 

Where we find out where to forward to.

PortableServer::Current_var ImR_Forwarder::poa_current_var_ [private]
 

POA reference.


The documentation for this class was generated from the following files:
Generated at Sat Dec 1 12:38:41 2001 for TAO_Implementation_Repository by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000