Package com.sun.corba.se.impl.oa.toa
Class TOAImpl
java.lang.Object
org.omg.CORBA.LocalObject
com.sun.corba.se.spi.oa.ObjectAdapterBase
com.sun.corba.se.impl.oa.toa.TOAImpl
- All Implemented Interfaces:
TOA,ObjectAdapter,Object
The Transient Object Adapter (TOA) represents the OA for purely transient
objects. It is used for standard RMI-IIOP as well as backwards compatible
server support (i.e. the ORB.connect() method)
Its characteristics include:
- There is only one OA instance of the TOA. Its OAId is { "TOA" }
- There is not adapter manager. The TOA manager ID is fixed.
- State is the same as ORB state (TBD)
- All object adapters must invoke ORB.adapterCreated when they are created.
- All adapter managers must invoke ORB.adapterManagerStateChanged when their state changes, mapping the internal state to an ORT state.
- AdapterStateChanged must be invoked (from somewhere) whenever an adapter state changes that is not due to an adapter manager state change.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConnect the given servant to the ORB by allocating a transient object key and creating an IOR and object reference using the current factory.voiddisconnect(Object objref) Disconnect the object from this ORB.voidenter()enter must be called before each request is invoked on a servant.voidexit()exit must be called after each request has been completed.getEffectivePolicy(int type) String[]getInterfaces(Object servant, byte[] objectId) Return the most derived interface for the given servant and objectId.voidGet the servant for the request given by the parameters.getLocalServant(byte[] objectId) Get the servant corresponding to the given objectId, if this is supported.intReturn the ID of the AdapterManager for this object adapter.shortgetState()Return the current state of this object adapter (see org.omg.PortableInterceptors for states.voidMust be called every time getInvocationServant is called after the request has completed.Methods inherited from class com.sun.corba.se.spi.oa.ObjectAdapterBase
getAdapterId, getAdapterTemplate, getCurrentFactory, getIORTemplate, getORB, initializeTemplate, invocationWrapper, iorWrapper, lifecycleWrapper, makeInvocationInfo, makeObject, omgInvocationWrapper, omgLifecycleWrapper, setCurrentFactoryMethods inherited from class org.omg.CORBA.LocalObject
_create_request, _create_request, _duplicate, _get_domain_managers, _get_interface, _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_policy_override, validate_connectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.sun.corba.se.spi.oa.ObjectAdapter
getAdapterTemplate, getCurrentFactory, getIORTemplate, getORB, makeInvocationInfo, setCurrentFactory
-
Constructor Details
-
TOAImpl
-
-
Method Details
-
getObjectCopierFactory
- Specified by:
getObjectCopierFactoryin classObjectAdapterBase
-
getLocalServant
Description copied from interface:ObjectAdapterGet the servant corresponding to the given objectId, if this is supported. This method is only used for models where the servant is an ObjectImpl, which allows the servant to be used directly as the stub. This allows an object reference to be replaced by its servant when it is unmarshalled locally. Such objects are not ORB mediated.- Specified by:
getLocalServantin interfaceObjectAdapter- Specified by:
getLocalServantin classObjectAdapterBase
-
getInvocationServant
Get the servant for the request given by the parameters. This will update thread Current, so that subsequent calls to returnServant and removeCurrent from the same thread are for the same request.- Specified by:
getInvocationServantin interfaceObjectAdapter- Specified by:
getInvocationServantin classObjectAdapterBase- Parameters:
request- is the request containing the rest of the request
-
returnServant
public void returnServant()Description copied from interface:ObjectAdapterMust be called every time getInvocationServant is called after the request has completed.- Specified by:
returnServantin interfaceObjectAdapter- Specified by:
returnServantin classObjectAdapterBase
-
getInterfaces
Return the most derived interface for the given servant and objectId.- Specified by:
getInterfacesin interfaceObjectAdapter- Specified by:
getInterfacesin classObjectAdapterBase
-
getEffectivePolicy
- Specified by:
getEffectivePolicyin interfaceObjectAdapter- Specified by:
getEffectivePolicyin classObjectAdapterBase
-
getManagerId
public int getManagerId()Description copied from interface:ObjectAdapterReturn the ID of the AdapterManager for this object adapter.- Specified by:
getManagerIdin interfaceObjectAdapter- Specified by:
getManagerIdin classObjectAdapterBase
-
getState
public short getState()Description copied from interface:ObjectAdapterReturn the current state of this object adapter (see org.omg.PortableInterceptors for states.- Specified by:
getStatein interfaceObjectAdapter- Specified by:
getStatein classObjectAdapterBase
-
enter
Description copied from interface:ObjectAdapterenter must be called before each request is invoked on a servant.- Specified by:
enterin interfaceObjectAdapter- Specified by:
enterin classObjectAdapterBase- Throws:
OADestroyed- is thrown when an OA has been destroyed, which requires a retry in the case where an AdapterActivator is present.
-
exit
public void exit()Description copied from interface:ObjectAdapterexit must be called after each request has been completed. If enter is called, there must always be a corresponding exit.- Specified by:
exitin interfaceObjectAdapter- Specified by:
exitin classObjectAdapterBase
-
connect
Description copied from interface:TOAConnect the given servant to the ORB by allocating a transient object key and creating an IOR and object reference using the current factory. -
disconnect
Description copied from interface:TOADisconnect the object from this ORB.- Specified by:
disconnectin interfaceTOA
-