@Override public void onConnected(int heartbeat, int connectionID) { clientListener.onConnected(heartbeat, connectionID); dispatchEvent(event(EventType.ON_CONNECTED)); }
@SuppressWarnings("unused") private void onConnected(int heartbeat, int connectionID) { connected = true; body = iframe.getContentDocument().getBody(); collect(); this.connectionId = connectionID; listener.onConnected(heartbeat, connectionID); }
@SuppressWarnings("unused") private void onConnected(int heartbeat, int connectionID) { connected = true; body = iframe.getContentDocument().getBody(); collect(); this.connectionId = connectionID; listener.onConnected(heartbeat, connectionID); }
private void doOnConnected(int heartbeat, int connectionID, CometClientTransportWrapper transport) { if (refreshState != null) { if (transport == refreshTransport) { if (refreshState == RefreshState.PRIMARY_DISCONNECTED) { doneRefresh(); } else if (refreshState == RefreshState.CONNECTING) { primaryTransport.disconnect(); doneRefresh(); } else { throw new IllegalStateException("Unexpected refresh state"); } } else { // refreshed connection after connection failed if (refreshState != RefreshState.CONNECTING && refreshState != RefreshState.PRIMARY_RECONNECT) { throw new IllegalStateException("Unexpected refresh state"); } refreshState = null; listener.onAfterRefresh(); } } else { listener.onConnected(heartbeat, connectionID); } }
private void doOnConnected(int heartbeat, int connectionID, CometClientTransportWrapper transport) { if (refreshState != null) { if (transport == refreshTransport) { if (refreshState == RefreshState.PRIMARY_DISCONNECTED) { doneRefresh(); } else if (refreshState == RefreshState.CONNECTING) { primaryTransport.disconnect(); doneRefresh(); } else { throw new IllegalStateException("Unexpected refresh state"); } } else { // refreshed connection after connection failed if (refreshState != RefreshState.CONNECTING && refreshState != RefreshState.PRIMARY_RECONNECT) { throw new IllegalStateException("Unexpected refresh state"); } refreshState = null; listener.onAfterRefresh(); } } else { listener.onConnected(heartbeat, connectionID); } }
String[] params = initParameters.split(";"); connectionId = Integer.parseInt(params[1]); listener.onConnected(Integer.parseInt(params[0]), connectionId); } catch (NumberFormatException e) { listener.onError(new AtmosphereClientException("Unexpected init parameters: " + initParameters), true);
String[] params = initParameters.split(";"); connectionId = Integer.parseInt(params[1]); listener.onConnected(Integer.parseInt(params[0]), connectionId); } catch (NumberFormatException e) { listener.onError(new AtmosphereClientException("Unexpected init parameters: " + initParameters), true);
String[] params = initParameters.split(":"); connectionId = Integer.parseInt(params[1]); listener.onConnected(Integer.parseInt(params[0]), connectionId); } catch (NumberFormatException e) { listener.onError(new AtmosphereClientException("Unexpected init parameters: " + initParameters), true);
String[] params = initParameters.split(":"); connectionId = Integer.parseInt(params[1]); listener.onConnected(Integer.parseInt(params[0]), connectionId); } catch (NumberFormatException e) { listener.onError(new AtmosphereClientException("Unexpected init parameters: " + initParameters), true);
String[] params = initParameters.split(":"); connectionId = Integer.parseInt(params[1]); listener.onConnected(Integer.parseInt(params[0]), connectionId); } catch (NumberFormatException e) { listener.onError(new AtmosphereClientException("Unexpected init parameters: " + initParameters), true);
String[] params = initParameters.split(":"); connectionId = Integer.parseInt(params[1]); listener.onConnected(Integer.parseInt(params[0]), connectionId); } catch (NumberFormatException e) { listener.onError(new AtmosphereClientException("Unexpected init parameters: " + initParameters), true);
clientListener.onConnected(-1, -1); break; case ON_BEFORE_DISCONNECTED: