public class GameServer extends AbstractScreenService implements ServerDispatcher
| Modifier and Type | Field and Description |
|---|---|
private String |
custom |
private Path |
dir |
private Process |
instance |
private String |
path |
private de.dytanic.cloudnet.lib.server.ServerGroup |
serverGroup |
private de.dytanic.cloudnet.lib.server.info.ServerInfo |
serverInfo |
private ServerProcess |
serverProcess |
private ServerStage |
serverStage |
private long |
startupTimeStamp |
cachedLogMessages, screenSystemEnabledstartup| Constructor and Description |
|---|
GameServer(ServerProcess serverProcess,
ServerStage serverStage,
de.dytanic.cloudnet.lib.server.ServerGroup serverGroup) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bootstrap()
Prepare the game server
|
void |
copy()
Copy the template to the temporary folder
|
void |
copy(de.dytanic.cloudnet.lib.server.template.Template template)
Copy the template to the temporary folder
|
void |
copyDirectory(String name)
Copy folder
|
private void |
downloadTemplate(de.dytanic.cloudnet.lib.server.template.Template template)
Download the template from template information's.
|
private void |
downloadURL(de.dytanic.cloudnet.lib.server.template.Template template)
Download the template from url.
|
boolean |
equals(Object o) |
String |
getCustom() |
Path |
getDir() |
Process |
getInstance() |
String |
getPath() |
de.dytanic.cloudnet.lib.server.ServerGroup |
getServerGroup() |
de.dytanic.cloudnet.lib.server.info.ServerInfo |
getServerInfo() |
ServerProcess |
getServerProcess() |
ServerStage |
getServerStage() |
de.dytanic.cloudnet.lib.service.ServiceId |
getServiceId() |
long |
getStartupTimeStamp() |
int |
hashCode() |
void |
kill()
Kill the process.
|
void |
restart()
Restart the game server
|
boolean |
shutdown()
Shutdown the game server
|
private void |
startProcess()
Start the java process
|
private boolean |
templateDownloader()
Download the template from master.
|
String |
toString() |
addCachedItem, disableScreenSystem, enableScreenSystem, getCachedLogMessages, isScreenSystemEnabledclone, finalize, getClass, notify, notifyAll, wait, wait, waitexecuteCommand, getStartup, isAliveprivate ServerProcess serverProcess
private ServerStage serverStage
private de.dytanic.cloudnet.lib.server.ServerGroup serverGroup
private Process instance
private de.dytanic.cloudnet.lib.server.info.ServerInfo serverInfo
private long startupTimeStamp
private Path dir
private String path
private String custom
public GameServer(ServerProcess serverProcess, ServerStage serverStage, de.dytanic.cloudnet.lib.server.ServerGroup serverGroup)
public de.dytanic.cloudnet.lib.server.info.ServerInfo getServerInfo()
public String getPath()
public de.dytanic.cloudnet.lib.server.ServerGroup getServerGroup()
public long getStartupTimeStamp()
public ServerStage getServerStage()
public Path getDir()
public String getCustom()
public boolean bootstrap()
throws Exception
bootstrap in interface de.dytanic.cloudnet.lib.interfaces.ExecutableException - Throws false if something wrongpublic boolean shutdown()
shutdown in interface de.dytanic.cloudnet.lib.interfaces.Executablepublic void kill()
public void copy()
public de.dytanic.cloudnet.lib.service.ServiceId getServiceId()
getServiceId in interface Screenablepublic Process getInstance()
getInstance in interface ScreenablegetInstance in interface ServerDispatcherpublic void copy(de.dytanic.cloudnet.lib.server.template.Template template)
template - The template with information'sprivate boolean templateDownloader()
throws Exception
Exception - throws if something wrong.public ServerProcess getServerProcess()
private void downloadURL(de.dytanic.cloudnet.lib.server.template.Template template)
throws IOException
template - The information about the template.IOException - Throws is something wrong.private void downloadTemplate(de.dytanic.cloudnet.lib.server.template.Template template)
throws IOException
template - The template with the information's.IOException - Throws is something wrongpublic void restart()
public void copyDirectory(String name)
name - The name of the folder.Copyright © 2020. All rights reserved.