edu.stanford.slac.aida.lib.util.common
Class _PersistentDaObjectBase

java.lang.Object
  extended by edu.stanford.slac.aida.lib.util.common._DaObjectBase
      extended by edu.stanford.slac.aida.lib.util.common._PersistentDaObjectBase

public class _PersistentDaObjectBase
extends _DaObjectBase

Creates Portable Object Adaptor for Aida NameServer. This object is a sub-class of _DaObjectBase directly and exists seperately to _PersistentDaObject because _PersistentDaObject extends _DaObject, which in turn extends _DaObjectBase. Hence, the user of this class (NameServer) can avoid having methods defined for accessing the NameServer (which are defined in _DaObject), which wouldn't make much sense for NameServer itself. Implemented in this fashion due to unavailability of multiple inheritance in java. Sadly corespondence between methods in _PersistentDaObject and _PersistentDaObjectBase must be maintained manually.

Version:
31-Jul-2005, Greg White (greg): Append "perisistentPOA" to m_child peristentPOANAme, and add NO_IMPLICIT_ACTIVATION policy; to correct init for "perisistent" servers.
Author:
20-Mar-2002, Greg

Field Summary
 org.omg.PortableServer.POA m_childPersistentPOA
          Persistent POA
 java.lang.String m_childPersistentPOAName
          Persistent POA Name
static java.lang.String PDO_SERVER_NAME
          Default name if cannot be determined from either command line or properties Also used by to determine the Persistent name for the Name Server.
 
Fields inherited from class edu.stanford.slac.aida.lib.util.common._DaObjectBase
DAO_PROPS, m_consumerPOA, m_err, m_event_channel, m_orb, m_POA_manager, m_props, m_rootPOA
 
Constructor Summary
_PersistentDaObjectBase()
          Constructs a _PersistentDaObject without EventService
_PersistentDaObjectBase(java.lang.String[] args, java.lang.String childPersistentPOAName)
          Constructs a PersistentUtil without EventService
_PersistentDaObjectBase(java.lang.String[] args, java.lang.String childPersistentPOAName, boolean events)
          Constructs a _PersistentDaObject including EventService initialization if desired
 
Method Summary
protected  void init(java.lang.String serverName)
          Initialises a _PersistentDaObject.
 void terminate()
          Shuts down the server via a call to orb.destroy()
 
Methods inherited from class edu.stanford.slac.aida.lib.util.common._DaObjectBase
EventConnect, getNameServerIOR, getORB, getPPConsumer, init, initEventService, setNameServerIOR, Start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PDO_SERVER_NAME

public static final java.lang.String PDO_SERVER_NAME
Default name if cannot be determined from either command line or properties Also used by to determine the Persistent name for the Name Server.

See Also:
Constant Field Values

m_childPersistentPOA

public org.omg.PortableServer.POA m_childPersistentPOA
Persistent POA


m_childPersistentPOAName

public java.lang.String m_childPersistentPOAName
Persistent POA Name

Constructor Detail

_PersistentDaObjectBase

public _PersistentDaObjectBase()
                        throws edu.stanford.slac.except.AidaInitException
Constructs a _PersistentDaObject without EventService

Throws:
edu.stanford.slac.except.AidaInitException

_PersistentDaObjectBase

public _PersistentDaObjectBase(java.lang.String[] args,
                               java.lang.String childPersistentPOAName)
                        throws edu.stanford.slac.except.AidaInitException
Constructs a PersistentUtil without EventService

Parameters:
args - a list of CORBA properties name value pairs, see primary constructor
childPersistentPOAName - a text string with which to name the child POA created. This might just be the name of the server like "DaServer", and if given as null the server name will be used.
Throws:
edu.stanford.slac.except.AidaInitException

_PersistentDaObjectBase

public _PersistentDaObjectBase(java.lang.String[] args,
                               java.lang.String childPersistentPOAName,
                               boolean events)
                        throws edu.stanford.slac.except.AidaInitException
Constructs a _PersistentDaObject including EventService initialization if desired

Parameters:
args - a list of CORBA properties name value pairs, see primary constructor
childPersistentPOAName - a text string with which to name the child POA created. This might just be the name of the server like "DaServer", and if given as null the server name will be used.
events - whether to initialize EventService. If this is true a push_consumerImpl must be in the classpath
Throws:
edu.stanford.slac.except.AidaInitException
Method Detail

init

protected void init(java.lang.String serverName)
             throws edu.stanford.slac.except.AidaInitException
Initialises a _PersistentDaObject. Notably, creates a policy to govern its existence based on the user id associated with the calling process

Overrides:
init in class _DaObjectBase
Throws:
edu.stanford.slac.except.AidaInitException - up-translated exception from CORBA initialization.

terminate

public void terminate()
               throws edu.stanford.slac.except.TerminateException
Shuts down the server via a call to orb.destroy()

Throws:
edu.stanford.slac.except.TerminateException - Thrown if the server cannot be terminated.