Пример #1
0
  private void doOnRefresh(CometClientTransportWrapper transport) {
    if (refreshState == null && transport == primaryTransport) {
      refreshState = RefreshState.CONNECTING;

      if (refreshTransport == null) {
        refreshTransport = new CometClientTransportWrapper();
      }
      refreshTransport.connect();

      listener.onRefresh();
    } else if (transport == refreshTransport) {
      refreshEnqueue(REFRESH);
    } else {
      throw new IllegalStateException("Unexpected refresh from primaryTransport");
    }
  }
Пример #2
0
 private void doConnect() {
   primaryTransport.connect();
 }