org.apache.avalon.phoenix.interfaces
Interface ApplicationMBean

All Known Implementing Classes:
DefaultApplication

public interface ApplicationMBean

This is the interface via which you can manager the root container of Applications.

Author:
Peter Donald, Leo Simons

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 java.lang.String[] getBlockNames()
          Get the names of the blocks that compose this Application
 java.lang.String getDescription()
          Get the string used to describe the application in the UI.
 java.lang.String getDisplayName()
          Get the name to display in Management UI.
 java.lang.String getHomeDirectory()
          Get location of Application installation
 java.lang.String getName()
          Get the name of the application.
 boolean isRunning()
          Return true if the application is running or false otherwise.
 void restart()
          Shutdown and restart the application running.
 void start()
          Start the application running.
 void stop()
          Stop the application running.
 

Field Detail

ROLE

public static final java.lang.String ROLE
Method Detail

getName

public java.lang.String getName()
Get the name of the application.

Returns:
the name of the application

getDisplayName

public java.lang.String getDisplayName()
Get the name to display in Management UI.

Returns:
the name of the application to display in UI

getDescription

public java.lang.String getDescription()
Get the string used to describe the application in the UI.

Returns:
a short description of the application

getHomeDirectory

public java.lang.String getHomeDirectory()
Get location of Application installation

Returns:
the home directory of application

getBlockNames

public java.lang.String[] getBlockNames()
Get the names of the blocks that compose this Application

Returns:
list of block names

isRunning

public boolean isRunning()
Return true if the application is running or false otherwise.

Returns:
true if application is running, false otherwise

start

public void start()
           throws java.lang.IllegalStateException,
                  ApplicationException
Start the application running. This is only valid when isRunning() returns false, otherwise it will generate an IllegalStateException.

Throws:
java.lang.IllegalStateException - if application is already running
ApplicationException - if the application failed to start. the message part of exception will contain more information pertaining to why the application failed to startup

restart

public void restart()
             throws java.lang.IllegalStateException,
                    ApplicationException
Shutdown and restart the application running. This is only valid when isRunning() returns true, otherwise it will generate an IllegalStateException. This is equivelent to calling stop() and then start() in succession.

Throws:
java.lang.IllegalStateException - if application is not already running
ApplicationException - if the application failed to stop or start. the message part of exception will contain more information pertaining to why the application failed to startup/shutdown

stop

public void stop()
          throws java.lang.IllegalStateException,
                 ApplicationException
Stop the application running. This is only valid when isRunning() returns true, otherwise it will generate an IllegalStateException.

Throws:
java.lang.IllegalStateException - if application is not already running
ApplicationException - if the application failed to shutdown. the message part of exception will contain more information pertaining to why the application failed to shutodwn


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.