moved sessionstate enum to sessionImpl

This commit is contained in:
ingmargoudt 2017-03-07 22:15:58 +01:00
parent daed944eb6
commit 0a77c186be
2 changed files with 32 additions and 34 deletions

View file

@ -76,10 +76,7 @@ public final class Constants {
*/ */
public static final int PRIORITY_TIME_SEC = 1200; public static final int PRIORITY_TIME_SEC = 1200;
public enum SessionState {
DISCONNECTED, CONNECTED, CONNECTING, DISCONNECTING, SERVER_STARTING
}
public enum Option { public enum Option {

View file

@ -33,6 +33,7 @@ import java.net.*;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import mage.MageException; import mage.MageException;
import mage.cards.decks.DeckCardLists; import mage.cards.decks.DeckCardLists;
import mage.cards.decks.InvalidDeckException; import mage.cards.decks.InvalidDeckException;
@ -40,7 +41,6 @@ import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository; import mage.cards.repository.CardRepository;
import mage.cards.repository.ExpansionInfo; import mage.cards.repository.ExpansionInfo;
import mage.cards.repository.ExpansionRepository; import mage.cards.repository.ExpansionRepository;
import mage.constants.Constants.SessionState;
import mage.constants.ManaType; import mage.constants.ManaType;
import mage.constants.PlayerAction; import mage.constants.PlayerAction;
import mage.game.GameException; import mage.game.GameException;
@ -63,11 +63,14 @@ import org.jboss.remoting.transport.socket.SocketWrapper;
import org.jboss.remoting.transporter.TransporterClient; import org.jboss.remoting.transporter.TransporterClient;
/** /**
*
* @author BetaSteward_at_googlemail.com * @author BetaSteward_at_googlemail.com
*/ */
public class SessionImpl implements Session { public class SessionImpl implements Session {
private enum SessionState {
DISCONNECTED, CONNECTED, CONNECTING, DISCONNECTING, SERVER_STARTING
}
private static final Logger logger = Logger.getLogger(SessionImpl.class); private static final Logger logger = Logger.getLogger(SessionImpl.class);
private final MageClient client; private final MageClient client;
@ -468,7 +471,6 @@ public class SessionImpl implements Session {
} }
/** /**
*
* @param askForReconnect - true = connection was lost because of error and * @param askForReconnect - true = connection was lost because of error and
* ask the user if he want to try to reconnect * ask the user if he want to try to reconnect
*/ */
@ -965,7 +967,6 @@ public class SessionImpl implements Session {
} }
@Override @Override
public boolean joinGame(UUID gameId) { public boolean joinGame(UUID gameId) {
try { try {