Add proper handling for lost server connections
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@581 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
d2df76cae4
commit
ada8c1869c
8 changed files with 98 additions and 6 deletions
|
@ -54,6 +54,8 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
/** */
|
||||
public MockEvent1<String> participantLeftEvent = new MockEvent1<String>();
|
||||
/** */
|
||||
public MockEvent connectionLostEvent = new MockEvent();
|
||||
/** */
|
||||
public GameData currentGame;
|
||||
/** */
|
||||
public GameData offeredGame;
|
||||
|
@ -177,6 +179,11 @@ public class MockConnectionControl implements IConnectionControl {
|
|||
return participantLeftEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEvent getConnectionLostEvent() {
|
||||
return connectionLostEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void offerGame(GameData data) {
|
||||
offeredGame = data;
|
||||
|
|
|
@ -79,6 +79,8 @@ public class MockView implements IView {
|
|||
/** */
|
||||
public MockEvent acknowledgeInvalidEvent = new MockEvent();
|
||||
/** */
|
||||
public MockEvent acknowledgeConnectionLostEvent = new MockEvent();
|
||||
/** */
|
||||
public MockEvent1<File> loadFileEvent = new MockEvent1<File>();
|
||||
|
||||
@Override
|
||||
|
@ -116,6 +118,11 @@ public class MockView implements IView {
|
|||
return acknowledgeInvalidEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEvent getAcknowledgeConnectionLostEvent() {
|
||||
return acknowledgeConnectionLostEvent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IEvent getEndProgramEvent() {
|
||||
return quitEvent;
|
||||
|
@ -173,7 +180,7 @@ public class MockView implements IView {
|
|||
|
||||
@Override
|
||||
public void showSidePanel(boolean show) {
|
||||
isSidePanelVisible=show;
|
||||
isSidePanelVisible = show;
|
||||
}
|
||||
|
||||
public void showQuitWarningPanel(boolean show) {
|
||||
|
@ -192,7 +199,7 @@ public class MockView implements IView {
|
|||
|
||||
@Override
|
||||
public void showConnectPanel(boolean show) {
|
||||
isConnectPanelVisible=show;
|
||||
isConnectPanelVisible = show;
|
||||
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue