![]() |
Overview Invokes a method dynamically within a server. Original class CORBA::BOA::DynamicImplementation Exceptions This method must not throw any exceptions. Instead, exceptions should be stored on the input ServerRequest object, using the exception method.
Intended Usage
This pure virtual method is intended to be overridden in subclasses of CORBA::BOA::DynamicImplementation. It is never called directly by applications; rather, the BOA residing in a server calls this method to dispatch remote calls on objects that inherit from CORBA::BOA::DynamicImplementation. This method is part of the Dynamic Skeleton Interface (DSI), used primarily to construct inter-ORB bridges or gateway servers.
When a remote invocation arrives at a server, if the target of the invocation is an object that inherits from CORBA::BOA::DynamicImplementation, BOA calls the invoke method on the target object. BOA constructs and passes in a ServerRequest object that contains all the information about the incoming request that is needed for the object to dispatch it. As an example, an implementation of the invoke method could do the following:
- Obtain the name of the operation to be invoked from the ServerRequest.
- Discover the signature of the operation to be invoked (for example, using the Interface Repository or a cache of InterfaceDef objects, or by invoking _get_interface on the target object).
- Create an NVList containing the TypeCodes (but not the values) corresponding to the signature of the operation to be invoked.
- Call ServerRequest::params, passing in the NVList; the ServerRequest::params method stores the in and inout parameter values in the NVList.
- Dispatch the operation on the target object using the in and inout parameter values now available from the NVList.
- Store the inout and out parameter values in the NVList.
- Call ServerRequest::result to record the operation result.
The BOA then sends the response to the calling client. If an exception is thrown by the dispatched operation, the invoke method must catch it and record it by calling ServerRequest::exception. CORBA::BOA::DynamicImplementation::invoke must never throw any exceptions.
IDL Syntax
virtual void invoke (ServerRequest_ptr request, Environment &env) throw () = 0;
Input parameters
- request
- A ServerRequest object that provides information about the operation to be invoked, the target object, and the values of the in and inout parameters.
- env
- An Environment object, to be used only when calling BOA::get_principal.
Return values
None.
Related reference... | |
CORBA module in Object Request Broker | |
Parent: CORBA module: BOA::DynamicImplementation Class | |