예제 #1
0
 @Override
 public void onDisconnected() {
   cancelTimers();
   if (transport instanceof WebSocketCometTransport && webSocketSuccessful == false) {
     // server doesn't support WebSocket's degrade the connection ...
     transport = GWT.create(CometTransport.class);
     transport.initiate(AtmosphereClient.this, this);
   }
   doOnDisconnected(this);
 }
예제 #2
0
    public CometClientTransportWrapper() {
      // Websocket support not enabled yet

      if (webSocketsEnabled && WebSocketCometTransport.hasWebSocketSupport()) {
        transport = new WebSocketCometTransport();
      } else {
        transport = GWT.create(CometTransport.class);
      }
      GWT.log("Created transport: " + transport.getClass().getName());
      transport.initiate(AtmosphereClient.this, this);
    }