mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
Removed embedded server from Session
This commit is contained in:
parent
ae86414658
commit
d541779d66
2 changed files with 0 additions and 29 deletions
|
@ -28,7 +28,6 @@
|
|||
|
||||
package mage.remote;
|
||||
|
||||
import mage.interfaces.Action;
|
||||
import mage.remote.interfaces.*;
|
||||
|
||||
/**
|
||||
|
@ -38,5 +37,4 @@ import mage.remote.interfaces.*;
|
|||
*/
|
||||
public interface Session extends ClientData, Connect, GamePlay, GameTypes, ServerState, ChatSession, Feedback, PlayerActions, Replays, Testable {
|
||||
|
||||
void setEmbeddedMageServerAction(Action embeddedMageServerAction);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,6 @@ import mage.constants.Constants.SessionState;
|
|||
import mage.game.GameException;
|
||||
import mage.game.match.MatchOptions;
|
||||
import mage.game.tournament.TournamentOptions;
|
||||
import mage.interfaces.Action;
|
||||
import mage.interfaces.MageClient;
|
||||
import mage.interfaces.MageServer;
|
||||
import mage.interfaces.ServerState;
|
||||
|
@ -71,18 +70,12 @@ public class SessionImpl implements Session {
|
|||
private SessionState sessionState = SessionState.DISCONNECTED;
|
||||
private Connection connection;
|
||||
|
||||
private Action embeddedMageServerAction;
|
||||
|
||||
private static boolean debugMode = false;
|
||||
private static boolean standalone = true;
|
||||
|
||||
private boolean canceled = false;
|
||||
|
||||
static {
|
||||
debugMode = System.getProperty("debug.mage") != null;
|
||||
if (System.getProperty("skip.standalone") != null) {
|
||||
standalone = false;
|
||||
}
|
||||
}
|
||||
|
||||
public SessionImpl(MageClient client) {
|
||||
|
@ -107,11 +100,6 @@ public class SessionImpl implements Session {
|
|||
|
||||
@Override
|
||||
public boolean connect() {
|
||||
|
||||
/*if (standalone && connection.getHost().equals("localhost")) {
|
||||
runEmbeddedMageServer();
|
||||
}*/
|
||||
|
||||
sessionState = SessionState.CONNECTING;
|
||||
try {
|
||||
System.setProperty("http.nonProxyHosts", "code.google.com");
|
||||
|
@ -205,16 +193,6 @@ public class SessionImpl implements Session {
|
|||
return false;
|
||||
}
|
||||
|
||||
private void runEmbeddedMageServer() {
|
||||
if (embeddedMageServerAction != null) {
|
||||
try {
|
||||
embeddedMageServerAction.execute();
|
||||
} catch (MageException e) {
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void handleCannotConnectException(CannotConnectException ex) {
|
||||
logger.warn("Cannot connect", ex);
|
||||
Throwable t = ex.getCause();
|
||||
|
@ -1180,11 +1158,6 @@ public class SessionImpl implements Session {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEmbeddedMageServerAction(Action embeddedMageServerAction) {
|
||||
this.embeddedMageServerAction = embeddedMageServerAction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean ping() {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue