org.omg.PortableServer
Class ServantLocatorPOA

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by org.omg.PortableServer.Servant sample code for org.omg.PortableServer.Servant definition code for org.omg.PortableServer.Servant 
      extended by org.omg.PortableServer.ServantLocatorPOA
All Implemented Interfaces:
InvokeHandler sample code for org.omg.CORBA.portable.InvokeHandler definition code for org.omg.CORBA.portable.InvokeHandler , ServantLocatorOperations sample code for org.omg.PortableServer.ServantLocatorOperations definition code for org.omg.PortableServer.ServantLocatorOperations , ServantManagerOperations sample code for org.omg.PortableServer.ServantManagerOperations definition code for org.omg.PortableServer.ServantManagerOperations

public abstract class ServantLocatorPOA
extends Servant sample code for org.omg.PortableServer.Servant definition code for org.omg.PortableServer.Servant
implements ServantLocatorOperations sample code for org.omg.PortableServer.ServantLocatorOperations definition code for org.omg.PortableServer.ServantLocatorOperations , InvokeHandler sample code for org.omg.CORBA.portable.InvokeHandler definition code for org.omg.CORBA.portable.InvokeHandler

When the POA has the NON_RETAIN policy it uses servant managers that are ServantLocators. Because the POA knows that the servant returned by this servant manager will be used only for a single request, it can supply extra information to the servant manager's operations and the servant manager's pair of operations may be able to cooperate to do something different than a ServantActivator. When the POA uses the ServantLocator interface, immediately after performing the operation invocation on the servant returned by preinvoke, the POA will invoke postinvoke on the servant manager, passing the ObjectId value and the Servant value as parameters (among others). This feature may be used to force every request for objects associated with a POA to be mediated by the servant manager.


Constructor Summary
ServantLocatorPOA sample code for org.omg.PortableServer.ServantLocatorPOA.ServantLocatorPOA() definition code for org.omg.PortableServer.ServantLocatorPOA.ServantLocatorPOA() ()
           
 
Method Summary
 String sample code for java.lang.String definition code for java.lang.String [] _all_interfaces sample code for org.omg.PortableServer.ServantLocatorPOA._all_interfaces(org.omg.PortableServer.POA, byte[]) definition code for org.omg.PortableServer.ServantLocatorPOA._all_interfaces(org.omg.PortableServer.POA, byte[]) (POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA  poa, byte[] objectId)
          Used by the ORB to obtain complete type information from the servant.
 OutputStream sample code for org.omg.CORBA.portable.OutputStream definition code for org.omg.CORBA.portable.OutputStream _invoke sample code for org.omg.PortableServer.ServantLocatorPOA._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler) definition code for org.omg.PortableServer.ServantLocatorPOA._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler) (String sample code for java.lang.String definition code for java.lang.String  $method, InputStream sample code for org.omg.CORBA.portable.InputStream definition code for org.omg.CORBA.portable.InputStream  in, ResponseHandler sample code for org.omg.CORBA.portable.ResponseHandler definition code for org.omg.CORBA.portable.ResponseHandler  $rh)
          Invoked by the ORB to dispatch a request to the servant.
 ServantLocator sample code for org.omg.PortableServer.ServantLocator definition code for org.omg.PortableServer.ServantLocator _this sample code for org.omg.PortableServer.ServantLocatorPOA._this() definition code for org.omg.PortableServer.ServantLocatorPOA._this() ()
           
 ServantLocator sample code for org.omg.PortableServer.ServantLocator definition code for org.omg.PortableServer.ServantLocator _this sample code for org.omg.PortableServer.ServantLocatorPOA._this(org.omg.CORBA.ORB) definition code for org.omg.PortableServer.ServantLocatorPOA._this(org.omg.CORBA.ORB) (ORB sample code for org.omg.CORBA.ORB definition code for org.omg.CORBA.ORB  orb)
           
 
Methods inherited from class org.omg.PortableServer.Servant sample code for org.omg.PortableServer.Servant definition code for org.omg.PortableServer.Servant
_default_POA sample code for org.omg.PortableServer.Servant._default_POA() definition code for org.omg.PortableServer.Servant._default_POA() , _get_delegate sample code for org.omg.PortableServer.Servant._get_delegate() definition code for org.omg.PortableServer.Servant._get_delegate() , _get_interface_def sample code for org.omg.PortableServer.Servant._get_interface_def() definition code for org.omg.PortableServer.Servant._get_interface_def() , _is_a sample code for org.omg.PortableServer.Servant._is_a(java.lang.String) definition code for org.omg.PortableServer.Servant._is_a(java.lang.String) , _non_existent sample code for org.omg.PortableServer.Servant._non_existent() definition code for org.omg.PortableServer.Servant._non_existent() , _object_id sample code for org.omg.PortableServer.Servant._object_id() definition code for org.omg.PortableServer.Servant._object_id() , _orb sample code for org.omg.PortableServer.Servant._orb() definition code for org.omg.PortableServer.Servant._orb() , _poa sample code for org.omg.PortableServer.Servant._poa() definition code for org.omg.PortableServer.Servant._poa() , _set_delegate sample code for org.omg.PortableServer.Servant._set_delegate(org.omg.PortableServer.portable.Delegate) definition code for org.omg.PortableServer.Servant._set_delegate(org.omg.PortableServer.portable.Delegate) , _this_object sample code for org.omg.PortableServer.Servant._this_object() definition code for org.omg.PortableServer.Servant._this_object() , _this_object sample code for org.omg.PortableServer.Servant._this_object(org.omg.CORBA.ORB) definition code for org.omg.PortableServer.Servant._this_object(org.omg.CORBA.ORB)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 
Methods inherited from interface org.omg.PortableServer.ServantLocatorOperations sample code for org.omg.PortableServer.ServantLocatorOperations definition code for org.omg.PortableServer.ServantLocatorOperations
postinvoke sample code for org.omg.PortableServer.ServantLocatorOperations.postinvoke(byte[], org.omg.PortableServer.POA, java.lang.String, java.lang.Object, org.omg.PortableServer.Servant) definition code for org.omg.PortableServer.ServantLocatorOperations.postinvoke(byte[], org.omg.PortableServer.POA, java.lang.String, java.lang.Object, org.omg.PortableServer.Servant) , preinvoke sample code for org.omg.PortableServer.ServantLocatorOperations.preinvoke(byte[], org.omg.PortableServer.POA, java.lang.String, org.omg.PortableServer.ServantLocatorPackage.CookieHolder) definition code for org.omg.PortableServer.ServantLocatorOperations.preinvoke(byte[], org.omg.PortableServer.POA, java.lang.String, org.omg.PortableServer.ServantLocatorPackage.CookieHolder)
 

Constructor Detail

ServantLocatorPOA sample code for org.omg.PortableServer.ServantLocatorPOA() definition code for org.omg.PortableServer.ServantLocatorPOA()

public ServantLocatorPOA()
Method Detail

_invoke sample code for org.omg.PortableServer.ServantLocatorPOA._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler) definition code for org.omg.PortableServer.ServantLocatorPOA._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)

public OutputStream sample code for org.omg.CORBA.portable.OutputStream definition code for org.omg.CORBA.portable.OutputStream  _invoke(String sample code for java.lang.String definition code for java.lang.String  $method,
                            InputStream sample code for org.omg.CORBA.portable.InputStream definition code for org.omg.CORBA.portable.InputStream  in,
                            ResponseHandler sample code for org.omg.CORBA.portable.ResponseHandler definition code for org.omg.CORBA.portable.ResponseHandler  $rh)
Description copied from interface: InvokeHandler sample code for org.omg.CORBA.portable.InvokeHandler._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler) definition code for org.omg.CORBA.portable.InvokeHandler._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler)
Invoked by the ORB to dispatch a request to the servant. ORB passes the method name, an InputStream containing the marshalled arguments, and a ResponseHandler which the servant uses to construct a proper reply. Only CORBA SystemException may be thrown by this method. The method must return an OutputStream created by the ResponseHandler which contains the marshalled reply. A servant must not retain a reference to the ResponseHandler beyond the lifetime of a method invocation. Servant behaviour is defined as follows:

1. Determine correct method, and unmarshal parameters from InputStream.

2. Invoke method implementation.

3. If no user exception, create a normal reply using ResponseHandler.

4. If user exception occurred, create exception reply using ResponseHandler.

5. Marshal reply into OutputStream returned by ResponseHandler.

6. Return OutputStream to ORB.

Specified by:
_invoke sample code for org.omg.CORBA.portable.InvokeHandler._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler) definition code for org.omg.CORBA.portable.InvokeHandler._invoke(java.lang.String, org.omg.CORBA.portable.InputStream, org.omg.CORBA.portable.ResponseHandler) in interface InvokeHandler sample code for org.omg.CORBA.portable.InvokeHandler definition code for org.omg.CORBA.portable.InvokeHandler
Parameters:
$method - The method name.
in - The InputStream containing the marshalled arguments.
$rh - The ResponseHandler which the servant uses to construct a proper reply
Returns:
The OutputStream created by the ResponseHandler which contains the marshalled reply

_all_interfaces sample code for org.omg.PortableServer.ServantLocatorPOA._all_interfaces(org.omg.PortableServer.POA, byte[]) definition code for org.omg.PortableServer.ServantLocatorPOA._all_interfaces(org.omg.PortableServer.POA, byte[])

public String sample code for java.lang.String definition code for java.lang.String [] _all_interfaces(POA sample code for org.omg.PortableServer.POA definition code for org.omg.PortableServer.POA  poa,
                                byte[] objectId)
Description copied from class: Servant sample code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[]) definition code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[])
Used by the ORB to obtain complete type information from the servant.

Specified by:
_all_interfaces sample code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[]) definition code for org.omg.PortableServer.Servant._all_interfaces(org.omg.PortableServer.POA, byte[]) in class Servant sample code for org.omg.PortableServer.Servant definition code for org.omg.PortableServer.Servant
Parameters:
poa - POA with which the servant is associated.
objectId - is the id corresponding to the object associated with this servant.
Returns:
list of type information for the object.

_this sample code for org.omg.PortableServer.ServantLocatorPOA._this() definition code for org.omg.PortableServer.ServantLocatorPOA._this()

public ServantLocator sample code for org.omg.PortableServer.ServantLocator definition code for org.omg.PortableServer.ServantLocator  _this()

_this sample code for org.omg.PortableServer.ServantLocatorPOA._this(org.omg.CORBA.ORB) definition code for org.omg.PortableServer.ServantLocatorPOA._this(org.omg.CORBA.ORB)

public ServantLocator sample code for org.omg.PortableServer.ServantLocator definition code for org.omg.PortableServer.ServantLocator  _this(ORB sample code for org.omg.CORBA.ORB definition code for org.omg.CORBA.ORB  orb)