Class TOAImpl

All Implemented Interfaces:
TOA, ObjectAdapter, Object

@ManagedObject @Description("The Transient Object Adapter") public class TOAImpl extends ObjectAdapterBase implements TOA
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)
Other requirements:
  • 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.
  • Field Details

  • Constructor Details

  • Method Details

    • getId

      @NameValue private long getId()
    • getCodebase

      @ManagedAttribute @Description("The codebase used to create this TOA") private String getCodebase()
    • getTransientObjectManager

      @ManagedAttribute @Description("The TransientObjectManager") private TransientObjectManager getTransientObjectManager()
    • getObjectCopierFactory

      public org.glassfish.pfl.dynamic.copyobject.spi.ObjectCopierFactory getObjectCopierFactory()
      Specified by:
      getObjectCopierFactory in class ObjectAdapterBase
    • getLocalServant

      public Object getLocalServant(byte[] objectId)
      Description copied from interface: ObjectAdapter
      Get 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:
      getLocalServant in interface ObjectAdapter
      Specified by:
      getLocalServant in class ObjectAdapterBase
      Parameters:
      objectId - byte array representing the object ID
      Returns:
      corresponding servant
    • getInvocationServant

      public void getInvocationServant(OAInvocationInfo info)
      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:
      getInvocationServant in interface ObjectAdapter
      Specified by:
      getInvocationServant in class ObjectAdapterBase
      Parameters:
      info - is the request containing the rest of the request
    • returnServant

      public void returnServant()
      Description copied from interface: ObjectAdapter
      Must be called every time getInvocationServant is called after the request has completed.
      Specified by:
      returnServant in interface ObjectAdapter
      Specified by:
      returnServant in class ObjectAdapterBase
    • getInterfaces

      public String[] getInterfaces(Object servant, byte[] objectId)
      Return the most derived interface for the given servant and objectId.
      Specified by:
      getInterfaces in interface ObjectAdapter
      Specified by:
      getInterfaces in class ObjectAdapterBase
      Parameters:
      servant - servant object
      objectId - byte array forming the objectId
      Returns:
      list of derived interfaces
    • getEffectivePolicy

      public Policy getEffectivePolicy(int type)
      Specified by:
      getEffectivePolicy in interface ObjectAdapter
      Specified by:
      getEffectivePolicy in class ObjectAdapterBase
    • getManagerId

      public int getManagerId()
      Description copied from interface: ObjectAdapter
      Return the ID of the AdapterManager for this object adapter.
      Specified by:
      getManagerId in interface ObjectAdapter
      Specified by:
      getManagerId in class ObjectAdapterBase
      Returns:
      the identifier
    • getState

      public short getState()
      Description copied from interface: ObjectAdapter
      Return the current state of this object adapter (see org.omg.PortableInterceptor for states).
      Specified by:
      getState in interface ObjectAdapter
      Specified by:
      getState in class ObjectAdapterBase
      Returns:
      the current state of this object adapter
      See Also:
    • enter

      public void enter() throws OADestroyed
      Description copied from interface: ObjectAdapter
      enter must be called before each request is invoked on a servant.
      Specified by:
      enter in interface ObjectAdapter
      Specified by:
      enter in class ObjectAdapterBase
      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: ObjectAdapter
      exit 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:
      exit in interface ObjectAdapter
      Specified by:
      exit in class ObjectAdapterBase
    • connect

      public void connect(Object objref)
      Description copied from interface: TOA
      Connect the given servant to the ORB by allocating a transient object key and creating an IOR and object reference using the current factory.
      Specified by:
      connect in interface TOA
      Parameters:
      objref - servant to connect to the ORB
    • disconnect

      public void disconnect(Object objref)
      Description copied from interface: TOA
      Disconnect the object from this ORB.
      Specified by:
      disconnect in interface TOA
      Parameters:
      objref - ORB to disconnect from