Class DaemonLoader.Context
java.lang.Object
org.apache.commons.daemon.support.DaemonLoader.Context
- All Implemented Interfaces:
DaemonContext
- Enclosing class:
- DaemonLoader
A concrete
DaemonContext that acts as a simple value container.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]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.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 Details
-
Context
public Context()Constructs a new instance.
-
-
Method Details
-
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
Sets the daemon controller.- Parameters:
controller- the daemon controller.
-
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
Sets arguments. Note that this implementation doesn't currently make a defensive copy.- Parameters:
args- arguments.
-