TAO_Implementation_Repository  2.1.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
ImR_Forwarder Class Reference

Implementation Repository Forwarder. More...

#include <Forwarder.h>

Inheritance diagram for ImR_Forwarder:
Inheritance graph
Collaboration diagram for ImR_Forwarder:
Collaboration graph

Public Member Functions

 ImR_Forwarder (ImR_Locator_i &imr_impl)
 
virtual PortableServer::Servant preinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr poa, const char *operation, PortableServer::ServantLocator::Cookie &cookie)
 Called before the invocation begins. More...
 
virtual void postinvoke (const PortableServer::ObjectId &oid, PortableServer::POA_ptr adapter, const char *operation, PortableServer::ServantLocator::Cookie the_cookie, PortableServer::Servant the_servant)
 
void init (CORBA::ORB_ptr orb)
 

Private Attributes

ImR_Locator_ilocator_
 Where we find out where to forward to. More...
 
PortableServer::Current_var poa_current_var_
 POA reference. More...
 
CORBA::ORB_ptr orb_
 Variable to save the ORB reference passed to the constr. More...
 

Additional Inherited Members

- Public Types inherited from CORBA::LocalObject
typedef Object_ptr _ptr_type
 
typedef Object_var _var_type
 
typedef Object_out _out_type
 
- Static Public Member Functions inherited from CORBA::LocalObject
static CORBA::Boolean marshal (const Object_ptr x, TAO_OutputCDR &cdr)
 
static void _tao_any_destructor (void *)
 
static CORBA::Boolean is_nil_i (CORBA::Object_ptr obj)
 
static void tao_object_initialize (Object *)
 
static CORBA::Object_ptr _duplicate (CORBA::Object_ptr obj)
 
static CORBA::Object_ptr _nil (void)
 
static CORBA::Object_ptr _narrow (CORBA::Object_ptr obj)
 
- Protected Member Functions inherited from CORBA::LocalObject
 Object (int dummy=0)
 
TAO::Object_Proxy_Brokerproxy_broker () const
 

Detailed Description

Implementation Repository Forwarder.

This class 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 ( ImR_Locator_i imr_impl)

This constructor takes in orb and ImR_Locator_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::init ( CORBA::ORB_ptr  orb)
void ImR_Forwarder::postinvoke ( const PortableServer::ObjectId oid,
PortableServer::POA_ptr  adapter,
const char *  operation,
PortableServer::ServantLocator::Cookie  the_cookie,
PortableServer::Servant  the_servant 
)
virtual
PortableServer::Servant ImR_Forwarder::preinvoke ( const PortableServer::ObjectId oid,
PortableServer::POA_ptr  poa,
const char *  operation,
PortableServer::ServantLocator::Cookie &  cookie 
)
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.

Member Data Documentation

ImR_Locator_i& ImR_Forwarder::locator_
private

Where we find out where to forward to.

CORBA::ORB_ptr ImR_Forwarder::orb_
private

Variable to save the ORB reference passed to the constr.

PortableServer::Current_var ImR_Forwarder::poa_current_var_
private

POA reference.


The documentation for this class was generated from the following files: