public class SubServer
extends java.lang.Object
Constructor and Description |
---|
SubServer(SubServers host,
java.lang.String name,
boolean enabled,
boolean log,
java.lang.String directory,
Executable executable,
java.lang.String stopcmd)
Creates a SubServer
|
Modifier and Type | Method and Description |
---|---|
void |
command(java.lang.String command)
Commands the Server
|
java.lang.String |
getDirectory()
Get the Server Directory
|
SubLogger |
getLogger()
Get Process Logger
|
java.lang.String |
getName()
Gets the name of the Server
|
java.lang.String |
getStopCommand()
Grab the Command to Stop the Server
|
boolean |
isEnabled()
If the Server is Enabled
|
boolean |
isLogging()
If the Server is Logging
|
boolean |
isRunning()
If the Server is Running
|
void |
setEnabled(boolean value)
Set if the Server is Enabled
|
void |
setLogging(boolean value)
Set if the Server is Logging
|
void |
setStopCommand(java.lang.String value)
Set the Command that Stops the Server
|
void |
start(java.util.UUID address)
Starts the Server
|
void |
stop()
Stops the Server
|
void |
terminate()
Terminates the Server
|
void |
waitFor()
Waits for the Server to Stop
|
public SubServer(SubServers host, java.lang.String name, boolean enabled, boolean log, java.lang.String directory, Executable executable, java.lang.String stopcmd) throws InvalidServerException
host
- SubServers.Hostname
- Nameenabled
- Enabled Statuslog
- Logging Statusdirectory
- Directoryexecutable
- Executable Stringstopcmd
- Stop CommandInvalidServerException
public void start(java.util.UUID address)
address
- External Logging Addresspublic void stop()
public void terminate()
public void command(java.lang.String command)
command
- Command to Sendpublic void waitFor() throws java.lang.InterruptedException
java.lang.InterruptedException
public java.lang.String getName()
public boolean isRunning()
public boolean isEnabled()
public void setEnabled(boolean value)
value
- Valuepublic boolean isLogging()
public void setLogging(boolean value)
value
- Valuepublic SubLogger getLogger()
public java.lang.String getDirectory()
public java.lang.String getStopCommand()
public void setStopCommand(java.lang.String value)
value
- Value