public class DaemonLauncher
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_STDOUT_LOG_FILE |
| Constructor and Description |
|---|
DaemonLauncher()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
launch(java.lang.String instanceName,
java.lang.Class<?> daemonClass)
Launch the daemon as a background process (with a FIFO for communication).
|
static void |
main(java.lang.String[] args)
This is the main method invoked by the shell command used
to start the background process.
|
void |
setJvmOptions(java.lang.String jvmOptions)
Set options to be passed to the JVM
(e.g., "-Xmx1024m -Djavax.net.debug=all").
|
void |
setStdoutLogFile(java.lang.String stdoutLogFile)
Set the name of the file to which the stdout/stderr of the daemon will
be redirected.
|
public static final java.lang.String DEFAULT_STDOUT_LOG_FILE
public void setStdoutLogFile(java.lang.String stdoutLogFile)
stdoutLogFile - name of stdout/stderr log filepublic void setJvmOptions(java.lang.String jvmOptions)
jvmOptions - options to be passed to the JVMpublic void launch(java.lang.String instanceName,
java.lang.Class<?> daemonClass)
throws DaemonException
instanceName - the instance name to usedaemonClass - the daemon classDaemonExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
args - argumentsjava.io.IOExceptionjava.lang.Exception