Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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

Collaboration diagram for alma::acs::container::AcsContainerRunner:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

void main (String[] args)

Static Public Attributes

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

final String CONTAINER_NAME_PROPERTYNAME = "ACS.containerName"
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.


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.

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.

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

Startup choreography: performs the various tasks in the correct order.

Note on the implementation: the steps involved are grouped as private methods that access the instance variables. The intent was to make the sequence clearer.

Parameters:
args command line args as given to main.
Exceptions:
AcsJContainerServicesEx at the slightest provocation...

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

Parses commandline and property options.

Parameters:
args as received by main()


Member Data Documentation

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

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

AcsEmbeddedContainerRunner alma::acs::container::AcsContainerRunner::embeddedRunner [protected]
 

int alma::acs::container::AcsContainerRunner::initialSleeptimeMillis = 0 [protected]
 

AcsCorba alma::acs::container::AcsContainerRunner::m_acsCorba [protected]
 

String alma::acs::container::AcsContainerRunner::m_containerName [protected]
 

int alma::acs::container::AcsContainerRunner::m_containerPort = -1 [protected]
 

Logger alma::acs::container::AcsContainerRunner::m_logger [protected]
 

String alma::acs::container::AcsContainerRunner::m_managerLoc [protected]
 

ShutdownHook alma::acs::container::AcsContainerRunner::m_shutdownHook [private]
 

boolean alma::acs::container::AcsContainerRunner::m_useRecoveryMode [protected]
 

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


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 02:52:24 2009 for ACS Java API by doxygen 1.3.8