Examples of CoinsetterResponse


Examples of com.xeiam.xchange.coinsetter.dto.CoinsetterResponse

    }

    @Override
    public void run() {

      CoinsetterResponse heatbeatResponse = null;
      int tryTimes = 0;
      do {
        try {
          Thread.sleep(heatbeatInterval);
          heatbeatResponse = clientSessionServiceRaw.heartbeat(session.getUuid());
          log.trace("heatbeat: {}", heatbeatResponse);
          tryTimes = 0;
        } catch (CoinsetterException e) {
          heatbeatResponse = null;
        } catch (IOException e) {
          log.warn(e.getMessage(), e);
          tryTimes++;
        } catch (InterruptedException e) {
          log.debug("Interrupted: {}", e.getMessage());
          this.interrupt();
        }
      } while (!this.isInterrupted() && tryTimes < heartbeatMaxFailureTimes && heatbeatResponse != null && "SUCCESS".equals(heatbeatResponse.getRequestStatus()));

      // Session logged out or session is invalid
      log.debug("Session logged out or session is invalid.");
      try {
        lock.writeLock().lock();
View Full Code Here

Examples of com.xeiam.xchange.coinsetter.dto.CoinsetterResponse

    CoinsetterClientSession clientSession = clientSessionService.login(username, password, ipAddress);
    log.info("Client session: {}", clientSession);

    for (int i = 0; i < 2; i++) {
      TimeUnit.SECONDS.sleep(30);
      CoinsetterResponse heartbeatResponse = clientSessionService.heartbeat(clientSession.getUuid());
      log.info("hearbeat: {}", heartbeatResponse);
    }

    CoinsetterResponse logoutResponse = clientSessionService.logout(clientSession.getUuid());
    log.info("logout: {}", logoutResponse);

    try {
      CoinsetterResponse heartbeatResponse = clientSessionService.heartbeat(clientSession.getUuid());
      log.info("hearbeat: {}", heartbeatResponse);
    } catch (CoinsetterException e) {
      log.info("{}", e.getMessage());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.