Package com.google.code.hs4j.impl

Examples of com.google.code.hs4j.impl.ReconnectRequest


            + session.getRemoteSocketAddress());
      }
      HandlerSocketSession hSession = (HandlerSocketSession) session;
      InetSocketAddress addr = hSession.getRemoteSocketAddress();
      this.hsClient.getConnector().addToWatingQueue(
          new ReconnectRequest(addr, 0, this.hsClient
              .getHealConnectionInterval()));
    }
  }
View Full Code Here


    }

    @Override
    public void run() {
      while (HandlerSocketConnectorImpl.this.isStarted()) {
          ReconnectRequest request=null;
          InetSocketAddress address=null;
        try {
           request = HandlerSocketConnectorImpl.this.waitingQueue
              .take();

           address = request.getRemoteAddr();

          boolean connected = false;
          Future<Boolean> future = HandlerSocketConnectorImpl.this
              .connect(request.getRemoteAddr());
          request.setTries(request.getTries() + 1);
          try {
            log.warn("Trying to connect to "
                + address.getAddress().getHostAddress() + ":"
                + address.getPort() + " for "
                + request.getTries() + " times");
            if (!future.get(HSClient.DEFAULT_CONNECT_TIMEOUT,
                TimeUnit.MILLISECONDS)) {
              connected = false;
            } else {
              connected = true;
View Full Code Here

TOP

Related Classes of com.google.code.hs4j.impl.ReconnectRequest

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.