Package java.net

Examples of java.net.ConnectException.initCause()



        if (!channelFuture.isDone() || !channelFuture.isSuccess()) {
            ConnectException cause = new ConnectException("Cannot connect to " + configuration.getAddress());
            if (channelFuture.cause() != null) {
                cause.initCause(channelFuture.cause());
            }
            throw cause;
        }
        Channel answer = channelFuture.channel();
        // to keep track of all channels in use
View Full Code Here


    try {
      return proxySelector.select(u.toURI()).get(0);
    } catch (URISyntaxException e) {
      final ConnectException err;
      err = new ConnectException(MessageFormat.format(JGitText.get().cannotDetermineProxyFor, u));
      err.initCause(e);
      throw err;
    }
  }

  private HttpSupport() {
View Full Code Here

       

        if (!channelFuture.isDone() || !channelFuture.isSuccess()) {
            ConnectException cause = new ConnectException("Cannot connect to " + configuration.getAddress());
            if (channelFuture.getCause() != null) {
                cause.initCause(channelFuture.getCause());
            }
            throw cause;
        }
        Channel answer = channelFuture.getChannel();
        // to keep track of all channels in use
View Full Code Here

    try {
      return proxySelector.select(u.toURI()).get(0);
    } catch (URISyntaxException e) {
      final ConnectException err;
      err = new ConnectException(MessageFormat.format(JGitText.get().cannotDetermineProxyFor, u));
      err.initCause(e);
      throw err;
    }
  }

  private HttpSupport() {
View Full Code Here

                t = new TimeoutException(String.format("No response received after %s", responseTimeoutInMs));
            }

            if (SSLHandshakeException.class.isAssignableFrom(t.getClass())) {
                Throwable t2 = new ConnectException();
                t2.initCause(t);
                t = t2;
            }

            return t;
        }
View Full Code Here

                t = new TimeoutException(String.format("No response received after %s", responseTimeoutInMs));
            }

            if (SSLHandshakeException.class.isAssignableFrom(t.getClass())) {
                Throwable t2 = new ConnectException();
                t2.initCause(t);
                t = t2;
            }

            return t;
        }
View Full Code Here

            logger.debug("Failed to recover from exception: {} with channel {}", cause, f.getChannel());

            ConnectException e = new ConnectException(f.getCause() != null ? cause.getMessage() + " to " + future.getURI().toString(): future.getURI().toString());
            if (cause != null) {
                e.initCause(cause);
            }
            future.abort(e);
        }
    }
View Full Code Here

    try {
      return proxySelector.select(u.toURI()).get(0);
    } catch (URISyntaxException e) {
      final ConnectException err;
      err = new ConnectException(MessageFormat.format(JGitText.get().cannotDetermineProxyFor, u));
      err.initCause(e);
      throw err;
    }
  }

  private HttpSupport() {
View Full Code Here

    try {
      return proxySelector.select(u.toURI()).get(0);
    } catch (URISyntaxException e) {
      final ConnectException err;
      err = new ConnectException(MessageFormat.format(JGitText.get().cannotDetermineProxyFor, u));
      err.initCause(e);
      throw err;
    }
  }

  private HttpSupport() {
View Full Code Here

        boolean printCause = cause != null && cause.getMessage() != null;
        String printedCause = printCause ? cause.getMessage() : getBaseUrl(future.getUri());
        ConnectException e = new ConnectException(printedCause);
        if (cause != null)
            e.initCause(cause);
        future.abort(e);
    }

    public final void operationComplete(ChannelFuture f) throws Exception {
        if (f.isSuccess())
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.