org.openmdx.base.application.control
Class Manageable

java.lang.Object
  extended by org.openmdx.base.application.control.Manageable
Direct Known Subclasses:
Application

public abstract class Manageable
extends Object

Manageables are similiar to applications. But they not have a run method and may not implement the EventListener or CmdLineLineListener interface.


Constructor Summary
Manageable()
           
 
Method Summary
 CmdLineArgs getCmdLineArgs()
          Returns the command line arguments as processed by the command line processor
 List getCmdLineOptions()
          Requests the command line options specification.
 ApplicationController getController()
          Returns the associated controller.
 String[] getRawArgs()
          Returns the command line arguments as received from the VM's main
protected abstract  void init()
          Initializes the manageable.
protected abstract  void release()
          The default manageable release.
 void setController(ApplicationController controller)
          Sets a controller.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Manageable

public Manageable()
Method Detail

init

protected abstract void init()
                      throws Exception
Initializes the manageable. May be overloaded by a concrete manageable If init() fails, init() has to cleanup all it's allocated resources.

Manageables are initialized in the order they have been registered with application controller.

Throws:
Exception

release

protected abstract void release()
                         throws Exception
The default manageable release. May be overloaded by a concrete manageable

Manageables are released in the reverse order they have been registered with application controller. release() is called only if init() was successful.

Throws:
Exception

getCmdLineOptions

public List getCmdLineOptions()
Requests the command line options specification. A manageable overrides this method to provide command line options.

Returns:
List. A list of cmd line options (objects of class CmdLineOption)

getCmdLineArgs

public CmdLineArgs getCmdLineArgs()
Returns the command line arguments as processed by the command line processor

Returns:
CmdLineArgs

getRawArgs

public String[] getRawArgs()
Returns the command line arguments as received from the VM's main

Returns:
String[]

getController

public ApplicationController getController()
Returns the associated controller. The application object must be registered with controller to have a controller object.

Returns:
ApplicationController_1_0

setController

public void setController(ApplicationController controller)
Sets a controller. This is done while registering the Application with the application controller.

Parameters:
controller -


This software is published under the BSD license. Copyright © 2003-2007, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.