Class OA

java.lang.Object
com.arjuna.orbportability.OA
Direct Known Subclasses:
ChildOA, RootOA

public abstract class OA extends Object
An attempt at some ORB portable ways of interacting with the OA. NOTE: initPOA *must* be called if you want to use the pre- and post- initialisation mechanisms.
Since:
JTS 2.1.
Version:
$Id: OA.java 2342 2006-03-30 13:06:17Z $
Author:
Mark Little (mark@arjuna.com)
  • Field Details

    • _defaultAdapterName

      protected String _defaultAdapterName
    • _oaName

      protected String _oaName
    • _preOAShutdown

      protected Hashtable _preOAShutdown
    • _postOAShutdown

      protected Hashtable _postOAShutdown
    • _preOAInitProperty

      protected Hashtable _preOAInitProperty
    • _postOAInitProperty

      protected Hashtable _postOAInitProperty
  • Method Details

    • init

      public void init() throws org.omg.CORBA.SystemException
      Ensure that all OA specific initialisation is done even if the programmer uses the OA specific init routines. This method does not need to be called if using initOA methods.
      Throws:
      org.omg.CORBA.SystemException
      Since:
      JTS 2.1.1.
    • initPOA

      public void initPOA() throws org.omg.CORBA.ORBPackage.InvalidName, org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.ORBPackage.InvalidName
      org.omg.CORBA.SystemException
    • getAssociatedORB

      public ORB getAssociatedORB()
    • setPOA

      public void setPOA(org.omg.PortableServer.POA p) throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • performPreInit

      protected void performPreInit(String oaName)
      Loads and runs the configured pre-initialisation classes
    • performPostSet

      protected void performPostSet(String oaName)
    • performPostInit

      protected void performPostInit(String oaName)
      Loads and runs the configured post-initialisation classes
    • initPOA

      public void initPOA(String[] args) throws org.omg.CORBA.ORBPackage.InvalidName, org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.ORBPackage.InvalidName
      org.omg.CORBA.SystemException
    • createPOA

      public ChildOA createPOA(String adapterName, org.omg.CORBA.Policy[] policies) throws org.omg.PortableServer.POAPackage.AdapterAlreadyExists, org.omg.PortableServer.POAPackage.InvalidPolicy, org.omg.PortableServer.POAManagerPackage.AdapterInactive
      Throws:
      org.omg.PortableServer.POAPackage.AdapterAlreadyExists
      org.omg.PortableServer.POAPackage.InvalidPolicy
      org.omg.PortableServer.POAManagerPackage.AdapterInactive
    • initOA

      public void initOA() throws org.omg.CORBA.ORBPackage.InvalidName, org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.ORBPackage.InvalidName
      org.omg.CORBA.SystemException
    • initOA

      public void initOA(String[] args) throws org.omg.CORBA.ORBPackage.InvalidName, org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.ORBPackage.InvalidName
      org.omg.CORBA.SystemException
    • addAttribute

      public boolean addAttribute(Attribute p)
    • destroy

      public abstract void destroy() throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • rootPoa

      public org.omg.PortableServer.POA rootPoa()
    • poa

      public org.omg.PortableServer.POA poa(String adapterName)
    • setPoa

      public boolean setPoa(String adapterName, org.omg.PortableServer.POA thePOA)
    • addPreShutdown

      public void addPreShutdown(PreShutdown c)
    • addPostShutdown

      public void addPostShutdown(PostShutdown c)
    • corbaReference

      public abstract org.omg.CORBA.Object corbaReference(org.omg.PortableServer.Servant obj)
      Returns:
      a CORBA object reference for the Servant/Implementation.
    • corbaReference

      public org.omg.CORBA.Object corbaReference(org.omg.PortableServer.Servant obj, org.omg.PortableServer.POA poa)
    • objectIsReady

      public abstract boolean objectIsReady(org.omg.PortableServer.Servant obj, byte[] id) throws org.omg.CORBA.SystemException
      Register the object with the ORB.
      Throws:
      org.omg.CORBA.SystemException
    • objectIsReady

      public abstract boolean objectIsReady(org.omg.PortableServer.Servant obj) throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • shutdownObject

      public abstract boolean shutdownObject(org.omg.CORBA.Object obj)
      Dispose of the object, i.e., unregister it from the ORB.
    • shutdownObject

      public abstract boolean shutdownObject(org.omg.PortableServer.Servant obj)
    • run

      public void run(String name) throws org.omg.CORBA.SystemException
      Place the server into a state where it can begin to accept requests for objects from clients.
      Throws:
      org.omg.CORBA.SystemException
    • run

      public void run() throws org.omg.CORBA.SystemException
      Throws:
      org.omg.CORBA.SystemException
    • getRootOA

      public static RootOA getRootOA(ORB associatedORB)
      Retrieve an OA instance given a unique name, if an OA instance with this name doesn't exist then create it.
      Parameters:
      associatedORB - The ORB this OA is being created for.
      Returns:
      The OA instance referred to by the name given.