org.omg.PortableServer
Class ServantLocatorPOA

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by org.omg.PortableServer.ServantLocatorPOA
All Implemented Interfaces:
InvokeHandler, ServantLocatorOperations, ServantManagerOperations

public abstract class ServantLocatorPOA
extends Servant
implements ServantLocatorOperations, InvokeHandler

The ServantLocator stub is an optional base for the servant locators. It cannot serve remote invocations, as methods in ServantLocatorOperations take POA as one of parameters. Both JDK 1.5 API and OMG specifies that POA is a local object that must not be transferred to the remote invocation target.

You do not need to derive your servant locator from this stub, it is enough to implement the ServantLocator interface. But you may choose to do this if you need its functional org.omg.PortableServer.ServantActivatorPOA.delegator#_ids() method or want to keep default behaviour during pre- or post- invokcations.


Constructor Summary
ServantLocatorPOA()
           
 
Method Summary
 String[] _all_interfaces(POA poa, byte[] Object_Id)
          Returns an array of interfaces, supported by the servant locator.
 OutputStream _invoke(String method, InputStream input, ResponseHandler handler)
          Our implementation will not call this method.
 ServantLocator _this()
          Return the complete instance of the servant activator, based on the current class (ServantActivatorPOA or derived).
 ServantLocator _this(ORB orb)
          Return the complete instance of the servant activator, based on the current class (ServantActivatorPOA or derived).
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.omg.PortableServer.ServantLocatorOperations
postinvoke, preinvoke
 

Constructor Detail

ServantLocatorPOA

public ServantLocatorPOA()
Method Detail

_invoke

public OutputStream _invoke(String method,
                            InputStream input,
                            ResponseHandler handler)
                     throws SystemException
Our implementation will not call this method. After setting your manager to POA, it will call incarnate and etherialize directly.

Specified by:
_invoke in interface InvokeHandler
Parameters:
method - the name of the method to invoke.
input - the input stream to read parameters from.
handler - the response handler, used for creating the reply.
Returns:
the output stream, returned by ResponseHandler. The response values are already written to that stream.
Throws:
SystemException - if invocation has failed due CORBA system exception.

_all_interfaces

public String[] _all_interfaces(POA poa,
                                byte[] Object_Id)
Returns an array of interfaces, supported by the servant locator.

Specified by:
_all_interfaces in class Servant
Parameters:
poa - a POA of the given object.
Object_Id - the object Id of the given object.
Returns:
an array, containing the repository ids.

_this

public ServantLocator _this()
Return the complete instance of the servant activator, based on the current class (ServantActivatorPOA or derived).


_this

public ServantLocator _this(ORB orb)
Return the complete instance of the servant activator, based on the current class (ServantActivatorPOA or derived).