|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.netarkivet.common.utils.ApplicationUtils
public abstract class ApplicationUtils
This class provides functionality for starting applications.
Field Summary | |
---|---|
static int |
EXCEPTION_WHEN_ADDING_MANAGEMENT
System.exit() value for the case where the management registration for the application could not be started. |
static int |
EXCEPTION_WHEN_ADDING_SHUTDOWN_HOOK
System.exit() value for the case where the Shutdown Hook for the application could not be added. |
static int |
EXCEPTION_WHILE_INSTANTIATING
System.exit() value for the case where the application class could not be instantiated. |
static int |
NO_FACTORY_METHOD
System.exit() value for the case where the application does not have a factory method. |
static int |
WRONG_ARGUMENTS
System.exit() value for the case where wrong arguments are given. |
Constructor Summary | |
---|---|
ApplicationUtils()
|
Method Summary | |
---|---|
static void |
dirMustExist(java.io.File dir)
Ensure that a directory is available and writable. |
static void |
startApp(java.lang.Class c,
java.lang.String[] args)
Starts up an application. |
static void |
startApp(LifeCycleComponent component)
Starts up an LifeCycleComponent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int WRONG_ARGUMENTS
public static final int NO_FACTORY_METHOD
public static final int EXCEPTION_WHILE_INSTANTIATING
public static final int EXCEPTION_WHEN_ADDING_SHUTDOWN_HOOK
public static final int EXCEPTION_WHEN_ADDING_MANAGEMENT
Constructor Detail |
---|
public ApplicationUtils()
Method Detail |
---|
public static void startApp(java.lang.Class c, java.lang.String[] args)
c
- The class to be started.args
- The arguments to the application (should be empty).public static void startApp(LifeCycleComponent component)
component
- The component to start.public static void dirMustExist(java.io.File dir)
dir
- A File object denoting a directory.
PermissionDenied
- if the directory doesn't exist and
cannot be created/written to, or if the File object indicates an existing
non-directory.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |