Class DaemonLoader.Context
- java.lang.Object
-
- org.apache.commons.daemon.support.DaemonLoader.Context
-
- All Implemented Interfaces:
DaemonContext
- Enclosing class:
- DaemonLoader
public static class DaemonLoader.Context extends Object implements DaemonContext
A concreteDaemonContextthat acts as a simple value container.
-
-
Constructor Summary
Constructors Constructor Description Context()Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]getArguments()Gets an array ofStringarguments supplied by the environment corresponding to the array of arguments given in thepublic static void main()method used as an entry point to most other Java programs.DaemonControllergetController()Gets aDaemonControllerobject that can be used to control theDaemoninstance that thisDaemonContextis passed to.voidsetArguments(String[] args)Sets arguments.voidsetController(DaemonController controller)Sets the daemon controller.
-
-
-
Constructor Detail
-
Context
public Context()
Constructs a new instance.
-
-
Method Detail
-
getController
public DaemonController getController()
Description copied from interface:DaemonContextGets aDaemonControllerobject that can be used to control theDaemoninstance that thisDaemonContextis passed to.- Specified by:
getControllerin interfaceDaemonContext- Returns:
- A
DaemonControllerobject that can be used to control theDaemon.
-
setController
public void setController(DaemonController controller)
Sets the daemon controller.- Parameters:
controller- the daemon controller.
-
getArguments
public String[] getArguments()
Description copied from interface:DaemonContextGets an array ofStringarguments supplied by the environment corresponding to the array of arguments given in thepublic static void main()method used as an entry point to most other Java programs.- Specified by:
getArgumentsin interfaceDaemonContext- Returns:
- An array of
Stringarguments supplied by the environment.
-
setArguments
public void setArguments(String[] args)
Sets arguments. Note that this implementation doesn't currently make a defensive copy.- Parameters:
args- arguments.
-
-