Add: first implementation of ServerLauncher
This commit is contained in:
@@ -63,17 +63,17 @@ public class RMIServer implements IGameServer {
|
||||
|
||||
|
||||
// Metodi interni del server
|
||||
private void notifyAll(NetworkEvent action) throws RemoteException {
|
||||
public void notifyAll(NetworkEvent action) throws RemoteException {
|
||||
for (IClientCallback cb : clients.values()) {
|
||||
cb.onAction(action);
|
||||
}
|
||||
}
|
||||
private void notifyAll(Game model) throws RemoteException {
|
||||
public void notifyAll(Game model) throws RemoteException {
|
||||
for (IClientCallback cb : clients.values()) {
|
||||
cb.onGameInit(model);
|
||||
}
|
||||
}
|
||||
private void notifyError(String username, String message) throws RemoteException {
|
||||
public void notifyError(String username, String message) throws RemoteException {
|
||||
IClientCallback cb = clients.get(username);
|
||||
if (cb != null) cb.onError(message);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class TCPServer {
|
||||
}
|
||||
}
|
||||
|
||||
private TCPServer(GameController gameController, int port){
|
||||
public TCPServer(GameController gameController, int port){
|
||||
this.port = port;
|
||||
this.gameController = gameController;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user