com.arjuna.orbportability
Class OA

java.lang.Object
  extended by 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 Summary
protected  String _defaultAdapterName
           
protected  String _oaName
           
protected  Hashtable _postOAInitProperty
           
protected  Hashtable _postOAShutdown
           
protected  Hashtable _preOAInitProperty
           
protected  Hashtable _preOAShutdown
           
 
Method Summary
 boolean addAttribute(Attribute p)
           
 void addPostShutdown(PostShutdown c)
           
 void addPreShutdown(PreShutdown c)
           
abstract  Object corbaReference(Servant obj)
           
 Object corbaReference(Servant obj, POA poa)
           
 ChildOA createPOA(String adapterName, Policy[] policies)
           
abstract  void destroy()
           
 ORB getAssociatedORB()
           
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.
 void init()
          Ensure that all OA specific initialisation is done even if the programmer uses the OA specific init routines.
 void initOA()
           
 void initOA(String[] args)
           
 void initPOA()
           
 void initPOA(String[] args)
           
abstract  boolean objectIsReady(Servant obj)
           
abstract  boolean objectIsReady(Servant obj, byte[] id)
          Register the object with the ORB.
protected  void performPostInit(String oaName)
          Loads and runs the configured post-initialisation classes
protected  void performPostSet(String oaName)
           
protected  void performPreInit(String oaName)
          Loads and runs the configured pre-initialisation classes
 POA poa(String adapterName)
           
 POA rootPoa()
           
 void run()
           
 void run(String name)
          Place the server into a state where it can begin to accept requests for objects from clients.
 void setPOA(POA p)
           
 boolean setPoa(String adapterName, POA thePOA)
           
abstract  boolean shutdownObject(Object obj)
          Dispose of the object, i.e., unregister it from the ORB.
abstract  boolean shutdownObject(Servant obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_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 Detail

init

public void init()
          throws 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:
SystemException
Since:
JTS 2.1.1.

initPOA

public void initPOA()
             throws InvalidName,
                    SystemException
Throws:
InvalidName
SystemException

getAssociatedORB

public ORB getAssociatedORB()

setPOA

public void setPOA(POA p)
            throws SystemException
Throws:
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 InvalidName,
                    SystemException
Throws:
InvalidName
SystemException

createPOA

public ChildOA createPOA(String adapterName,
                         Policy[] policies)
                  throws AdapterAlreadyExists,
                         InvalidPolicy,
                         AdapterInactive
Throws:
AdapterAlreadyExists
InvalidPolicy
AdapterInactive

initOA

public void initOA()
            throws InvalidName,
                   SystemException
Throws:
InvalidName
SystemException

initOA

public void initOA(String[] args)
            throws InvalidName,
                   SystemException
Throws:
InvalidName
SystemException

addAttribute

public boolean addAttribute(Attribute p)

destroy

public abstract void destroy()
                      throws SystemException
Throws:
SystemException

rootPoa

public POA rootPoa()

poa

public POA poa(String adapterName)

setPoa

public boolean setPoa(String adapterName,
                      POA thePOA)

addPreShutdown

public void addPreShutdown(PreShutdown c)

addPostShutdown

public void addPostShutdown(PostShutdown c)

corbaReference

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

corbaReference

public Object corbaReference(Servant obj,
                             POA poa)

objectIsReady

public abstract boolean objectIsReady(Servant obj,
                                      byte[] id)
                               throws SystemException
Register the object with the ORB.

Throws:
SystemException

objectIsReady

public abstract boolean objectIsReady(Servant obj)
                               throws SystemException
Throws:
SystemException

shutdownObject

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


shutdownObject

public abstract boolean shutdownObject(Servant obj)

run

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

Throws:
SystemException

run

public void run()
         throws SystemException
Throws:
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.


Copyright © 2011. All Rights Reserved.