public class ExternalSubServer extends SubServer
SubServer.LoggedCommand
Constructor and Description |
---|
ExternalSubServer(ExternalHost host,
java.lang.String name,
boolean enabled,
int port,
java.lang.String motd,
boolean log,
java.lang.String directory,
Executable executable,
java.lang.String stopcmd,
boolean restart,
boolean hidden,
boolean restricted)
Creates an External SubServer
|
Modifier and Type | Method and Description |
---|---|
boolean |
command(java.util.UUID player,
java.lang.String command)
Commands the Server
|
java.util.LinkedList<SubServer.LoggedCommand> |
getCommandHistory()
Gets all the commands that were sent to this SubServer successfully
|
java.lang.String |
getDirectory()
Get the Server Directory
|
Host |
getHost()
Grabs the Host of the Server
|
SubLogger |
getLogger()
Get Process Logger
|
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
|
boolean |
isTemporary()
If the Server is Temporary
|
void |
setAutoRestart(boolean value)
Set if the Server will Auto Restart on unexpected shutdowns
|
void |
setDisplayName(java.lang.String value)
Sets the Display Name for this Server
|
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 |
setTemporary(boolean value)
Set If the Server is Temporary (will start server if not running)
|
boolean |
start(java.util.UUID player)
Starts the Server
|
boolean |
stop(java.util.UUID player)
Stops the Server
|
boolean |
terminate(java.util.UUID player)
Terminates the Server
|
void |
waitFor()
Waits for the Server to Stop
|
boolean |
willAutoRestart()
If the Server will Auto Restart on unexpected shutdowns
|
command, start, stop, terminate
addExtra, getDisplayName, getExtra, getExtra, getMotd, getSubDataClient, hasExtra, isHidden, isRestricted, linkSubDataClient, removeExtra, setHidden, setMotd, setRestricted
public ExternalSubServer(ExternalHost host, java.lang.String name, boolean enabled, int port, java.lang.String motd, boolean log, java.lang.String directory, Executable executable, java.lang.String stopcmd, boolean restart, boolean hidden, boolean restricted) throws InvalidServerException
host
- Hostname
- Nameenabled
- Enabled Statusport
- Port Numbermotd
- MOTDlog
- Logging Statusdirectory
- Directoryexecutable
- Executablestopcmd
- Stop Commandrestart
- Auto-Restarthidden
- Hidden Statusrestricted
- Restricted StatusInvalidServerException
public boolean start(java.util.UUID player)
SubServer
public boolean stop(java.util.UUID player)
SubServer
public boolean terminate(java.util.UUID player)
SubServer
public boolean command(java.util.UUID player, java.lang.String command)
SubServer
public void waitFor() throws java.lang.InterruptedException
SubServer
public boolean isRunning()
SubServer
public void setDisplayName(java.lang.String value)
Server
setDisplayName
in class Server
value
- Value (or null to reset)public boolean isEnabled()
SubServer
public void setEnabled(boolean value)
SubServer
setEnabled
in class SubServer
value
- Valuepublic boolean isLogging()
SubServer
public void setLogging(boolean value)
SubServer
setLogging
in class SubServer
value
- Valuepublic java.util.LinkedList<SubServer.LoggedCommand> getCommandHistory()
SubServer
getCommandHistory
in class SubServer
public java.lang.String getDirectory()
SubServer
getDirectory
in class SubServer
public java.lang.String getStopCommand()
SubServer
getStopCommand
in class SubServer
public void setStopCommand(java.lang.String value)
SubServer
setStopCommand
in class SubServer
value
- Valuepublic boolean willAutoRestart()
SubServer
willAutoRestart
in class SubServer
public void setAutoRestart(boolean value)
SubServer
setAutoRestart
in class SubServer
value
- Valuepublic boolean isTemporary()
SubServer
isTemporary
in class SubServer
public void setTemporary(boolean value)
SubServer
setTemporary
in class SubServer
value
- Value