}
private void handleServerThreadChangeEvent(ServerThreadChangeEvent stce) {
switch (stce.getChange()) {
case ServerThreadChangeEvent.STARTED:
fireEvent(new MasterServerChangeEvent(
serverSession,
"Server started on port " + stce.getThread().getPort(),
MasterServerChangeEvent.STARTED));
break;
case ServerThreadChangeEvent.CLIENT_DISCONNECTED:
fireEvent(new MasterServerChangeEvent(
serverSession,
"Client/Player disconnected",
MasterServerChangeEvent.PLAYER_DISCONNECTED));
break;
case ServerThreadChangeEvent.NEW_CLIENT:
// TODO anything todo here? (maybe timeout for connect)
break;
case ServerThreadChangeEvent.DISCONNECT:
fireEvent(new MasterServerChangeEvent(
serverSession,
"Server stopped",
MasterServerChangeEvent.STOPPED));
break;
default: