forked from External/mage
client/server overhaul - tested on localhost, remote testing pending
This commit is contained in:
parent
ecbd843fb7
commit
892f7cce1b
90 changed files with 4448 additions and 500 deletions
|
|
@ -38,13 +38,15 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.logging.Level;
|
||||
import mage.cards.decks.DeckCardLists;
|
||||
import mage.game.GameException;
|
||||
import mage.interfaces.MageException;
|
||||
import mage.MageException;
|
||||
import mage.game.match.MatchOptions;
|
||||
import mage.game.tournament.TournamentOptions;
|
||||
import mage.interfaces.Server;
|
||||
import mage.interfaces.ServerState;
|
||||
import mage.interfaces.callback.CallbackException;
|
||||
import mage.interfaces.callback.ClientCallback;
|
||||
import mage.server.game.DeckValidatorFactory;
|
||||
import mage.server.draft.DraftManager;
|
||||
|
|
@ -105,8 +107,8 @@ public class ServerImpl extends RemoteServer implements Server {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void ack(String message, UUID sessionId) throws RemoteException, MageException {
|
||||
SessionManager.getInstance().getSession(sessionId).ack(message);
|
||||
public void ack(int messageId, UUID sessionId) throws RemoteException, CallbackException {
|
||||
SessionManager.getInstance().getSession(sessionId).ack(messageId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -209,9 +211,10 @@ public class ServerImpl extends RemoteServer implements Server {
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
catch (GameException ex) {
|
||||
throw ex;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (ex instanceof GameException)
|
||||
throw (GameException)ex;
|
||||
handleException(ex);
|
||||
}
|
||||
return false;
|
||||
|
|
@ -226,9 +229,10 @@ public class ServerImpl extends RemoteServer implements Server {
|
|||
return ret;
|
||||
}
|
||||
}
|
||||
catch (GameException ex) {
|
||||
throw ex;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
if (ex instanceof GameException)
|
||||
throw (GameException)ex;
|
||||
handleException(ex);
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue