org.omg.PortableServer
Class _ServantActivatorStub

java.lang.Object
  extended by org.omg.CORBA.portable.ObjectImpl
      extended by org.omg.PortableServer._ServantActivatorStub
All Implemented Interfaces:
Serializable, Object, IDLEntity, ServantActivator, ServantActivatorOperations, ServantManager, ServantManagerOperations

public class _ServantActivatorStub
extends ObjectImpl
implements ServantActivator, Serializable

This ServantActivator stub is an optional base for the servant activators. This stub cannot accept remote invocations, as methods in ServantActivatorOperations 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 activator from this stub, it is enough to implement the ServantActivator interface. But you may choose to do this if you need the functional _ids() method or want to keep default behavior during the incarnation or etherialization.

See Also:
Serialized Form

Field Summary
static Class _opsClass
          This the purpose of this field is undocumented up till 1.5 java API inclusive.
 
Constructor Summary
_ServantActivatorStub()
           
 
Method Summary
 String[] _ids()
          Return the array of repository ids for this object.
 void etherealize(byte[] Object_id, POA poa, Servant servant, boolean cleanup, boolean remaining)
          It is your responsibility to handle the etherialization event.
 Servant incarnate(byte[] Object_id, POA poa)
          It is your responsibility to handle the incarnation event and supply the servant.
 
Methods inherited from class org.omg.CORBA.portable.ObjectImpl
_create_request, _create_request, _duplicate, _get_delegate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _invoke, _is_a, _is_equivalent, _is_local, _non_existent, _orb, _release, _releaseReply, _request, _request, _servant_postinvoke, _servant_preinvoke, _set_delegate, _set_policy_override, equals, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.omg.CORBA.Object
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface_def, _get_policy, _hash, _is_a, _is_equivalent, _non_existent, _release, _request, _set_policy_override
 

Field Detail

_opsClass

public static final Class _opsClass
This the purpose of this field is undocumented up till 1.5 java API inclusive.

Constructor Detail

_ServantActivatorStub

public _ServantActivatorStub()
Method Detail

_ids

public String[] _ids()
Return the array of repository ids for this object.

Specified by:
_ids in class ObjectImpl
Returns:
{ "IDL:omg.org/PortableServer/ServantActivator:2.3", "IDL:omg.org/PortableServer/ServantManager:1.0" }, always.

incarnate

public Servant incarnate(byte[] Object_id,
                         POA poa)
                  throws ForwardRequest
It is your responsibility to handle the incarnation event and supply the servant. Override this method if using the class. The default method instructs POA that the servant cannot be provided by activator. The OBJ_ADAPTER exception will be thrown by POA, unless the servant is provided as one of the parameters in the activation method.

Specified by:
incarnate in interface ServantActivatorOperations
Parameters:
Object_id - the ObjectId value associated with the incoming request.
poa - the POA in which the object is being activated.
Returns:
a servant that will be used to process the incoming request.
Throws:
ForwardRequest
See Also:
ServantActivatorOperations.incarnate(byte[], org.omg.PortableServer.POA)

etherealize

public void etherealize(byte[] Object_id,
                        POA poa,
                        Servant servant,
                        boolean cleanup,
                        boolean remaining)
It is your responsibility to handle the etherialization event. Override this method if using the class. The default method does nothing.

Specified by:
etherealize in interface ServantActivatorOperations
Parameters:
Object_id - the Id of the object being deactivated.
poa - the POA in those scope the object was active.
servant - the servant, serving the object being deactivated.
cleanup - if true, this method was called from due deactivation or destruction operation. False indicates that the method was called due other reasons.
remaining - if true, at the invocation moment the passed servant is also associated with other objects in the active object map of the given POA.
See Also:
ServantActivatorOperations.incarnate(byte[], org.omg.PortableServer.POA)