alma::acs::container::AcsContainerRunner Class Reference

Collaboration diagram for alma::acs::container::AcsContainerRunner:
Collaboration graph
[legend]

List of all members.

Static Public Member Functions

static void main (String[] args)

Static Public Attributes

static final String CONTAINER_STARTTIME_DELAY_MILLIS_PROPERTYNAME = "acs.container.starttimeDelayMillis"

Protected Member Functions

 AcsContainerRunner ()
void initAcsLogging (final AcsManagerProxy managerProxy)
void checkReadyToRun () throws AcsJContainerEx

Protected Attributes

String m_containerName
String m_managerLoc
boolean m_useRecoveryMode
AcsEmbeddedContainerRunner embeddedRunner
Logger m_logger
AcsCorba m_acsCorba
int m_containerPort = -1
int initialSleeptimeMillis = 0

Package Functions

void setOptions (String[] args) throws AcsJContainerEx

Private Member Functions

void run (String[] args) throws AcsJContainerEx

Private Attributes

ShutdownHook m_shutdownHook

Static Private Attributes

static final String CONTAINER_NAME_PROPERTYNAME = "ACS.containerName"
static final String MANAGER_PROPERTYNAME = "ACS.manager"

Detailed Description

The main method of this class starts an AcsContainer.

Tasks performed are:

The implementation delegates many tasks to alma.acs.container.AcsEmbeddedContainerRunner, so that other applications which have to run a container inside can be written similarly to this class.

The functionality is comparable to that of maciActivate.cpp and maciContainerImpl.cpp/ContainerImpl/init(argc, argv) on the C++ side.

Author:
hsommer

Constructor & Destructor Documentation

alma::acs::container::AcsContainerRunner::AcsContainerRunner (  )  [inline, protected]

Empty constructor, only to be called from AcsContainerRunner::main method.

Referenced by main().


Member Function Documentation

void alma::acs::container::AcsContainerRunner::checkReadyToRun (  )  throws AcsJContainerEx [inline, protected]
void alma::acs::container::AcsContainerRunner::initAcsLogging ( final AcsManagerProxy  managerProxy  )  [inline, protected]

Asynchronously connects to the log service so that after some time the locally collected log records will be sent over the wire.

References alma::acs::container::AcsManagerProxy::getManager(), alma::acs::container::AcsManagerProxy::getManagerHandle(), alma::acs::container::corba::AcsCorba::getORB(), m_acsCorba, m_logger, and run().

Referenced by run().

static void alma::acs::container::AcsContainerRunner::main ( String[]  args  )  [inline, static]

The one and only main method to run a Java container. Options:

  • -manager myManagerloc
    CORBA loc for the Manager, e.g. corbaloc::myhost:xxxx/Manager (same as property ACS.manager, but with higher precedence); if missing, it will be taken from CDB, or will default to localhost.
  • -containerName myContainerName
    name under which the container will introduce itself to the ACS Manager (has precedence over the property ACS.containerName).
  • any other arguments will be passed on to the CORBA ORB.

References AcsContainerRunner(), alma::acs::container::corba::AcsCorba::doneCorba(), m_acsCorba, m_logger, and run().

void alma::acs::container::AcsContainerRunner::run ( String[]  args  )  throws AcsJContainerEx [inline, private]
void alma::acs::container::AcsContainerRunner::setOptions ( String[]  args  )  throws AcsJContainerEx [inline, package]

Member Data Documentation

final String alma::acs::container::AcsContainerRunner::CONTAINER_NAME_PROPERTYNAME = "ACS.containerName" [static, private]

Referenced by setOptions().

final String alma::acs::container::AcsContainerRunner::CONTAINER_STARTTIME_DELAY_MILLIS_PROPERTYNAME = "acs.container.starttimeDelayMillis" [static]

Referenced by setOptions().

Referenced by checkReadyToRun(), and run().

Referenced by run(), and setOptions().

Referenced by initAcsLogging(), main(), and run().

Referenced by run(), and setOptions().

Referenced by checkReadyToRun(), run(), and setOptions().

Referenced by initAcsLogging(), main(), run(), and setOptions().

Referenced by run(), and setOptions().

Referenced by run().

Referenced by run(), and setOptions().

final String alma::acs::container::AcsContainerRunner::MANAGER_PROPERTYNAME = "ACS.manager" [static, private]

Referenced by setOptions().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2