Package com.calclab.emite.base.util

Examples of com.calclab.emite.base.util.ScheduledAction


    if (isConnected() && currentRequests.isEmpty()) {
      if (currentBody != null) {
        sendBody(false);
      } else {
        final long currentRID = stream.rid;
        Platform.schedule(300, new ScheduledAction() {
          @Override
          public void run() {
            if (currentBody == null && stream.rid == currentRID) {
              createBodyIfNeeded();
              // Whitespace keep-alive
View Full Code Here


          eventBus.fireEventFromSource(new ConnectionStatusChangedEvent(ConnectionStatus.error, "Connection error: " + error.toString()), this);
          disconnect();
        } else {
          final int scedTime = RetryControl.retry(e);
          eventBus.fireEventFromSource(new ConnectionStatusChangedEvent(ConnectionStatus.waitingForRetry, "The connection will try to re-connect in " + scedTime + " milliseconds.", scedTime), this);
          Platform.schedule(scedTime, new ScheduledAction() {
            @Override
            public void run() {
              logger.info("Error retry: " + e);
              send(request);
            }
View Full Code Here

TOP

Related Classes of com.calclab.emite.base.util.ScheduledAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.