Package com.sun.corba.ee.spi.oa
Class ObjectAdapterBase
- java.lang.Object
-
- org.omg.CORBA.LocalObject
-
- com.sun.corba.ee.spi.oa.ObjectAdapterBase
-
- All Implemented Interfaces:
ObjectAdapter,Object
public abstract class ObjectAdapterBase extends LocalObject implements ObjectAdapter
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]adapterIdprivate ObjectReferenceTemplateadapterTemplateprivate ObjectReferenceFactorycurrentFactoryprivate IORTemplateiortempprivate booleanisNameServiceprivate ORBorbprotected static POASystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description ObjectAdapterBase(ORB orb)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidenter()enter must be called before each request is invoked on a servant.abstract voidexit()exit must be called after each request has been completed.byte[]getAdapterId()ObjectReferenceTemplategetAdapterTemplate()ObjectReferenceFactorygetCurrentFactory()private java.lang.StringgetDisplayState()abstract PolicygetEffectivePolicy(int type)abstract java.lang.String[]getInterfaces(java.lang.Object servant, byte[] objectId)Return the most derived interface for the given servant and objectId.abstract voidgetInvocationServant(OAInvocationInfo info)Get the servant for the request given by the parameters.IORTemplategetIORTemplate()Returns the IOR template of this adapter.abstract ObjectgetLocalServant(byte[] objectId)Get the servant corresponding to the given objectId, if this is supported.abstract intgetManagerId()Return the ID of the AdapterManager for this object adapter.protected abstract org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactorygetObjectCopierFactory()ORBgetORB()Returns the ORB associated with this adapter.abstract shortgetState()Return the current state of this object adapter (seeorg.omg.PortableInterceptorfor states).voidinitializeTemplate(ObjectKeyTemplate oktemp, boolean notifyORB, Policies policies, java.lang.String codebase, java.lang.String objectAdapterManagerId, ObjectAdapterId objectAdapterId)booleanisNameService()OAInvocationInfomakeInvocationInfo(byte[] objectId)Create an instance of InvocationInfo that is appropriate for this Object adapter.ObjectmakeObject(java.lang.String repId, byte[] oid)abstract voidreturnServant()Must be called every time getInvocationServant is called after the request has completed.voidsetCurrentFactory(ObjectReferenceFactory factory)Change the current factory.voidsetNameService(boolean flag)POASystemExceptionwrapper()-
Methods 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_connection
-
-
-
-
Field Detail
-
wrapper
protected static final POASystemException wrapper
-
orb
private ORB orb
-
iortemp
private IORTemplate iortemp
-
adapterId
private byte[] adapterId
-
adapterTemplate
private ObjectReferenceTemplate adapterTemplate
-
currentFactory
private ObjectReferenceFactory currentFactory
-
isNameService
private boolean isNameService
-
-
Constructor Detail
-
ObjectAdapterBase
public ObjectAdapterBase(ORB orb)
-
-
Method Detail
-
wrapper
public final POASystemException wrapper()
-
initializeTemplate
public final void initializeTemplate(ObjectKeyTemplate oktemp, boolean notifyORB, Policies policies, java.lang.String codebase, java.lang.String objectAdapterManagerId, ObjectAdapterId objectAdapterId)
-
makeObject
public final Object makeObject(java.lang.String repId, byte[] oid)
-
getAdapterId
public final byte[] getAdapterId()
-
getORB
public final ORB getORB()
Description copied from interface:ObjectAdapterReturns the ORB associated with this adapter.- Specified by:
getORBin interfaceObjectAdapter- Returns:
- the associated ORB
-
getEffectivePolicy
public abstract Policy getEffectivePolicy(int type)
- Specified by:
getEffectivePolicyin interfaceObjectAdapter
-
getIORTemplate
public final IORTemplate getIORTemplate()
Description copied from interface:ObjectAdapterReturns the IOR template of this adapter. The profiles in this template may be updated only during the AdapterCreated call. After that call completes, the IOR template must be made immutable. Note that the server ID, ORB ID, and adapter name are all available from the IOR template.- Specified by:
getIORTemplatein interfaceObjectAdapter- Returns:
- IOR template of this adapter
-
getManagerId
public abstract int getManagerId()
Description copied from interface:ObjectAdapterReturn the ID of the AdapterManager for this object adapter.- Specified by:
getManagerIdin interfaceObjectAdapter- Returns:
- the identifier
-
getState
public abstract short getState()
Description copied from interface:ObjectAdapterReturn the current state of this object adapter (seeorg.omg.PortableInterceptorfor states).- Specified by:
getStatein interfaceObjectAdapter- Returns:
- the current state of this object adapter
- See Also:
org.omg.PortableInterceptor
-
getDisplayState
@ManagedAttribute(id="State") @Description("The current Adapter state") private java.lang.String getDisplayState()
-
getAdapterTemplate
public final ObjectReferenceTemplate getAdapterTemplate()
- Specified by:
getAdapterTemplatein interfaceObjectAdapter
-
getCurrentFactory
public final ObjectReferenceFactory getCurrentFactory()
- Specified by:
getCurrentFactoryin interfaceObjectAdapter
-
setCurrentFactory
public final void setCurrentFactory(ObjectReferenceFactory factory)
Description copied from interface:ObjectAdapterChange the current factory. This may only be called during the AdapterCreated call.- Specified by:
setCurrentFactoryin interfaceObjectAdapter- Parameters:
factory- replacement factory
-
getLocalServant
public abstract Object getLocalServant(byte[] objectId)
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- Parameters:
objectId- byte array representing the object ID- Returns:
- corresponding servant
-
getInvocationServant
public abstract void getInvocationServant(OAInvocationInfo info)
Description copied from interface:ObjectAdapterGet the servant for the request given by the parameters. info must contain a valid objectId in this call. The servant is set in the InvocationInfo argument that is passed into this call.- Specified by:
getInvocationServantin interfaceObjectAdapter- Parameters:
info- is the InvocationInfo object for the object reference
-
returnServant
public abstract void returnServant()
Description copied from interface:ObjectAdapterMust be called every time getInvocationServant is called after the request has completed.- Specified by:
returnServantin interfaceObjectAdapter
-
enter
public abstract void enter() throws OADestroyedDescription copied from interface:ObjectAdapterenter must be called before each request is invoked on a servant.- Specified by:
enterin interfaceObjectAdapter- Throws:
OADestroyed- is thrown when an OA has been destroyed, which requires a retry in the case where an AdapterActivator is present.
-
exit
public abstract void exit()
Description copied from interface:ObjectAdapterexit must be called after each request has been completed. If enter is called and completes normally, there must always be a corresponding exit. If enter throw OADestroyed, exit must NOT be called.- Specified by:
exitin interfaceObjectAdapter
-
getObjectCopierFactory
protected abstract org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory getObjectCopierFactory()
-
makeInvocationInfo
public OAInvocationInfo makeInvocationInfo(byte[] objectId)
Description copied from interface:ObjectAdapterCreate an instance of InvocationInfo that is appropriate for this Object adapter.- Specified by:
makeInvocationInfoin interfaceObjectAdapter- Parameters:
objectId- ID of object to create- Returns:
- created instance
-
getInterfaces
public abstract java.lang.String[] getInterfaces(java.lang.Object servant, byte[] objectId)Description copied from interface:ObjectAdapterReturn the most derived interface for the given servant and objectId.- Specified by:
getInterfacesin interfaceObjectAdapter- Parameters:
servant- servant objectobjectId- byte array forming the objectId- Returns:
- list of derived interfaces
-
isNameService
public boolean isNameService()
- Specified by:
isNameServicein interfaceObjectAdapter
-
setNameService
public void setNameService(boolean flag)
- Specified by:
setNameServicein interfaceObjectAdapter
-
-