Class DaemonLoader
- java.lang.Object
-
- org.apache.commons.daemon.support.DaemonLoader
-
public final class DaemonLoader extends Object
Used by jsvc for Daemon management.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDaemonLoader.ContextA concreteDaemonContextthat acts as a simple value container.static classDaemonLoader.ControllerA DaemonController that acts on the the globalDaemonLoaderstate.
-
Constructor Summary
Constructors Constructor Description DaemonLoader()Constructs a new instance.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheck(String className)Checks whether the given class name can be instantiated with a zero-argument constructor.static booleandestroy()Invokes the wrappeddestroymethod.static booleanload(String className, String[] args)Loads the given class by name, initializing wrapper methods.static booleansignal()Invokes the wrappedsignalmethod.static booleanstart()Invokes the wrappedstartmethod.static booleanstop()Invokes the wrappedstopmethod.static voidversion()Prints version information toSystem.err.
-
-
-
Constructor Detail
-
DaemonLoader
public DaemonLoader()
Constructs a new instance.
-
-
Method Detail
-
version
public static void version()
Prints version information toSystem.err.
-
check
public static boolean check(String className)
Checks whether the given class name can be instantiated with a zero-argument constructor.- Parameters:
className- The class name.- Returns:
- true if the given class name can be instantiated, false otherwise.
-
signal
public static boolean signal()
Invokes the wrappedsignalmethod.- Returns:
- whether the call succeeded.
-
load
public static boolean load(String className, String[] args)
Loads the given class by name, initializing wrapper methods.- Parameters:
className- The class name to load.args- arguments for the context.- Returns:
- whether the operation succeeded.
-
start
public static boolean start()
Invokes the wrappedstartmethod.- Returns:
- whether the call succeeded.
-
stop
public static boolean stop()
Invokes the wrappedstopmethod.- Returns:
- whether the call succeeded.
-
destroy
public static boolean destroy()
Invokes the wrappeddestroymethod.- Returns:
- whether the call succeeded.
-
-