refactoring to rest app, fixed removal of simple update state logic that was causing a loop for CoreClient
This commit is contained in:
parent
46730ce216
commit
2593d97cab
5 changed files with 77 additions and 162 deletions
|
@ -20,6 +20,8 @@ public interface ICoreClient {
|
|||
|
||||
boolean start() throws IOException;
|
||||
|
||||
void updateState(SessionState state);
|
||||
|
||||
boolean setState(SessionState state) throws IOException;
|
||||
|
||||
GetServices getServices() throws IOException;
|
||||
|
|
|
@ -158,6 +158,10 @@ public class CoreRestClient implements ICoreClient {
|
|||
return setState(SessionState.INSTANTIATION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(SessionState state) {
|
||||
sessionState = state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setState(SessionState state) throws IOException {
|
||||
|
|
|
@ -46,7 +46,7 @@ public class CoreWebSocket {
|
|||
SessionState state = SessionState.get(event.getEventType().getValue());
|
||||
if (state != null) {
|
||||
logger.info("event updating session state: {}", state);
|
||||
controller.getCoreClient().setState(state);
|
||||
controller.getCoreClient().updateState(state);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
logger.error("error getting core event", ex);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue