public class NotifyWebServerViaFile extends java.lang.Object implements INotifyWebServer
| Modifier and Type | Field and Description |
|---|---|
private boolean |
active |
private java.io.File |
flagFile |
private java.lang.String |
flagFilename |
private static java.util.logging.Logger |
LOGGER |
private java.io.PrintWriter |
out |
ALL_CLIENTS_CONNECTED, GAME_STARTUP_COMPLETED, GAME_STARTUP_FAILED| Constructor and Description |
|---|
NotifyWebServerViaFile(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
allClientsConnected() |
private void |
createFlagfile() |
void |
gameStartupCompleted() |
void |
gameStartupFailed(java.lang.String reason) |
void |
gotClient(java.lang.String playerName,
boolean remote) |
boolean |
isActive() |
void |
readyToAcceptClients() |
private void |
removeFlagfile() |
void |
serverStoppedRunning() |
private static final java.util.logging.Logger LOGGER
private final java.lang.String flagFilename
private java.io.PrintWriter out
private java.io.File flagFile
private final boolean active
public boolean isActive()
isActive in interface INotifyWebServerpublic void readyToAcceptClients()
readyToAcceptClients in interface INotifyWebServerpublic void gotClient(java.lang.String playerName,
boolean remote)
gotClient in interface INotifyWebServerpublic void allClientsConnected()
allClientsConnected in interface INotifyWebServerpublic void gameStartupCompleted()
gameStartupCompleted in interface INotifyWebServerpublic void gameStartupFailed(java.lang.String reason)
gameStartupFailed in interface INotifyWebServerpublic void serverStoppedRunning()
serverStoppedRunning in interface INotifyWebServerprivate void createFlagfile()
private void removeFlagfile()