org.omg.PortableServer

Class _ServantLocatorStub

public class _ServantLocatorStub extends ObjectImpl implements ServantLocator, Serializable

The ServantLocator stub is an optional base for the servant locators. This stub cannot accept remote invocations, as methods in {@link 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 {@link ServantLocator} interface. But you may choose to do this if you need its functional {@link #_ids()} method or want to keep default behavior during per- or post- invokcations.

Field Summary
static Class_opsClass
This the purpose of this field is undocumented up till 1.5 java API inclusive.
Method Summary
voidpostinvoke(byte[] Object_id, POA poa, String method, Object cookie, Servant servant)
It is your responsibility to take the postinvoke actions, if any, by overriding this method.
Servantpreinvoke(byte[] Object_id, POA poa, String method, CookieHolder cookie)
It is your responsibility to take the preinvoke actions, if any, and also supply an appropriate servant for the current invocation.
String[]_ids()
Return the array of repository ids for this object, stating that it is both Servant locator and Servant manager.

Field Detail

_opsClass

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

Method Detail

postinvoke

public void postinvoke(byte[] Object_id, POA poa, String method, Object cookie, Servant servant)
It is your responsibility to take the postinvoke actions, if any, by overriding this method. The default method does nothing.

See Also: ServantLocatorOperations

preinvoke

public Servant preinvoke(byte[] Object_id, POA poa, String method, CookieHolder cookie)
It is your responsibility to take the preinvoke actions, if any, and also supply an appropriate servant for the current invocation. The default method instructs POA that the servant cannot be provided by locator. The OBJ_ADAPTER exception will be thrown by POA, unless it uses the available default servant for all invocations.

See Also: ServantLocatorOperations

UNKNOWN: in GNU Classpath, returning null means that the locator does not supply the servant.

_ids

public String[] _ids()
Return the array of repository ids for this object, stating that it is both Servant locator and Servant manager.

Returns: { "IDL:omg.org/PortableServer/ServantLocator:1.0", "IDL:omg.org/PortableServer/ServantManager:1.0" }, always.