mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 04:22:01 -08:00
more cleanup
This commit is contained in:
parent
637c45d3ce
commit
8dab053d3b
2 changed files with 2 additions and 34 deletions
|
|
@ -214,7 +214,7 @@ public class Client {
|
|||
try {
|
||||
return clientMessageHandler.joinTable(roomId, tableId, playerName, playerType, skill, deck, password);
|
||||
} catch (Exception ex) {
|
||||
logger.error("Error creating table", ex);
|
||||
logger.error("Error joining table", ex);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ public class Client {
|
|||
try {
|
||||
return clientMessageHandler.getTable(roomId, tableId);
|
||||
} catch (Exception ex) {
|
||||
logger.error("Error getting chat room id", ex);
|
||||
logger.error("Error getting table", ex);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -350,22 +350,10 @@ public class Client {
|
|||
return null;
|
||||
}
|
||||
|
||||
// public Collection<MatchView> getFinishedMatches(UUID roomId) {
|
||||
// throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
// }
|
||||
//
|
||||
// public Collection<RoomUsersView> getRoomUsers(UUID roomId) {
|
||||
// throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
// }
|
||||
|
||||
public void cheat(UUID gameId, UUID playerId, DeckCardLists importDeck) {
|
||||
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
}
|
||||
|
||||
// public UUID getGameChatId(UUID gameId) {
|
||||
// throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
|
||||
// }
|
||||
|
||||
public UUID joinGame(UUID gameId) {
|
||||
try {
|
||||
return clientMessageHandler.joinGame(gameId);
|
||||
|
|
|
|||
|
|
@ -47,12 +47,8 @@ import org.mage.network.handlers.MessageHandler;
|
|||
import org.mage.network.handlers.server.HeartbeatHandler;
|
||||
import org.mage.network.handlers.PingMessageHandler;
|
||||
import org.mage.network.handlers.WriteListener;
|
||||
//import org.mage.network.handlers.server.ChatMessageHandler;
|
||||
import org.mage.network.handlers.server.ConnectionHandler;
|
||||
//import org.mage.network.handlers.server.RegisterClientMessageHandler;
|
||||
//import org.mage.network.handlers.server.RoomMessageHandler;
|
||||
import org.mage.network.handlers.server.ServerRequestHandler;
|
||||
//import org.mage.network.handlers.server.TableMessageHandler;
|
||||
import org.mage.network.interfaces.MageServer;
|
||||
import org.mage.network.model.ChatMessageMessage;
|
||||
import org.mage.network.model.GameAskMessage;
|
||||
|
|
@ -84,24 +80,14 @@ public class Server {
|
|||
// private final MessageHandler h;
|
||||
private final PingMessageHandler pingMessageHandler = new PingMessageHandler();
|
||||
private final EventExecutorGroup handlersExecutor = new DefaultEventExecutorGroup(Runtime.getRuntime().availableProcessors() * 2);
|
||||
// private final RegisterClientMessageHandler registerClientMessageHandler;
|
||||
|
||||
// private final ChatMessageHandler chatMessageHandler;
|
||||
private final ServerRequestHandler serverMessageHandler;
|
||||
// private final RoomMessageHandler roomMessageHandler;
|
||||
// private final TableMessageHandler tableMessageHandler;
|
||||
|
||||
private final ExceptionHandler exceptionHandler;
|
||||
|
||||
public Server(MageServer server) {
|
||||
this.server = server;
|
||||
// h = new MessageHandler();
|
||||
// registerClientMessageHandler = new RegisterClientMessageHandler(server);
|
||||
// chatMessageHandler = new ChatMessageHandler(server);
|
||||
serverMessageHandler = new ServerRequestHandler(server);
|
||||
// roomMessageHandler = new RoomMessageHandler(server);
|
||||
// tableMessageHandler = new TableMessageHandler(server);
|
||||
|
||||
exceptionHandler = new ExceptionHandler();
|
||||
}
|
||||
|
||||
|
|
@ -151,13 +137,7 @@ public class Server {
|
|||
ch.pipeline().addLast("pingMessageHandler", pingMessageHandler);
|
||||
|
||||
ch.pipeline().addLast("connectionHandler", new ConnectionHandler());
|
||||
// ch.pipeline().addLast(handlersExecutor, "registerClientMessageHandler", registerClientMessageHandler);
|
||||
|
||||
// ch.pipeline().addLast(handlersExecutor, "chatMessageHandler", chatMessageHandler);
|
||||
ch.pipeline().addLast(handlersExecutor, "serverMessageHandler", serverMessageHandler);
|
||||
// ch.pipeline().addLast(handlersExecutor, "roomMessageHandler", roomMessageHandler);
|
||||
// ch.pipeline().addLast(handlersExecutor, "tableMessageHandler", tableMessageHandler);
|
||||
|
||||
ch.pipeline().addLast("exceptionHandler", exceptionHandler);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue