private void notifyConnected() { pingTimeout.cancel(); retries = 0; if (!connected) { connected = true; connectedTime = System.currentTimeMillis(); LogUtil.log(this + ": SSE channel is active."); } if (clientMessageBus.getState() == BusState.CONNECTION_INTERRUPTED) { clientMessageBus.setState(BusState.CONNECTED); } }
private void notifyDisconnected() { connected = false; pingTimeout.cancel(); LogUtil.log(this + " channel disconnected."); connectedTime = -1; clientMessageBus.setState(BusState.CONNECTION_INTERRUPTED); disconnect(sseChannel); if (!stopped) { retries++; start(); } }