public String getPath() { if (this.targethost != null) { StringBuffer buffer = new StringBuffer(); buffer.append(this.targethost.getHost()); int port = this.targethost.getPort(); if (port == -1) { port = this.targethost.getProtocol().getDefaultPort(); } buffer.append(':'); buffer.append(port); return buffer.toString(); } else { return "/"; } }
/** * Sets the {@link HostConfiguration host configuration}. * * @param hostconfig The hostConfiguration to set * * @deprecated no longer applicable */ public void setHostConfiguration(final HostConfiguration hostconfig) { if (hostconfig != null) { this.httphost = new HttpHost( hostconfig.getHost(), hostconfig.getPort(), hostconfig.getProtocol()); } else { this.httphost = null; } }
/** * Creates a new HTTP connection for the given host configuration. * * @param hostConfiguration the host/proxy/protocol to use */ public HttpConnection(HostConfiguration hostConfiguration) { this(hostConfiguration.getProxyHost(), hostConfiguration.getProxyPort(), hostConfiguration.getHost(), hostConfiguration.getPort(), hostConfiguration.getProtocol()); this.localAddress = hostConfiguration.getLocalAddress(); }
throw new IllegalStateException("destination host must be configured"); if (hostconf.getProtocol().isSecure()) { throw new IllegalStateException("secure protocol socket factory may not be used");
httpConnection.setProtocol(hostConfiguration.getProtocol()); httpConnection.setLocalAddress(hostConfiguration.getLocalAddress());
public String getPath() { if (this.targethost != null) { StringBuffer buffer = new StringBuffer(); buffer.append(this.targethost.getHost()); int port = this.targethost.getPort(); if (port == -1) { port = this.targethost.getProtocol().getDefaultPort(); } buffer.append(':'); buffer.append(port); return buffer.toString(); } else { return "/"; } }
public String getPath() { if (this.targethost != null) { StringBuffer buffer = new StringBuffer(); buffer.append(this.targethost.getHost()); int port = this.targethost.getPort(); if (port == -1) { port = this.targethost.getProtocol().getDefaultPort(); } buffer.append(':'); buffer.append(port); return buffer.toString(); } else { return "/"; } }
public String getPath() { if (this.targethost != null) { StringBuffer buffer = new StringBuffer(); buffer.append(this.targethost.getHost()); int port = this.targethost.getPort(); if (port == -1) { port = this.targethost.getProtocol().getDefaultPort(); } buffer.append(':'); buffer.append(port); return buffer.toString(); } else { return "/"; } }
public String getPath() { if (this.targethost != null) { StringBuffer buffer = new StringBuffer(); buffer.append(this.targethost.getHost()); int port = this.targethost.getPort(); if (port == -1) { port = this.targethost.getProtocol().getDefaultPort(); } buffer.append(':'); buffer.append(port); return buffer.toString(); } else { return "/"; } }
/** * Sets the {@link HostConfiguration host configuration}. * * @param hostconfig The hostConfiguration to set * * @deprecated no longer applicable */ public void setHostConfiguration(final HostConfiguration hostconfig) { if (hostconfig != null) { this.httphost = new HttpHost( hostconfig.getHost(), hostconfig.getPort(), hostconfig.getProtocol()); } else { this.httphost = null; } }
/** * Sets the {@link HostConfiguration host configuration}. * * @param hostconfig The hostConfiguration to set * * @deprecated no longer applicable */ public void setHostConfiguration(final HostConfiguration hostconfig) { if (hostconfig != null) { this.httphost = new HttpHost( hostconfig.getHost(), hostconfig.getPort(), hostconfig.getProtocol()); } else { this.httphost = null; } }
/** * Sets the {@link HostConfiguration host configuration}. * * @param hostconfig The hostConfiguration to set * * @deprecated no longer applicable */ public void setHostConfiguration(final HostConfiguration hostconfig) { if (hostconfig != null) { this.httphost = new HttpHost( hostconfig.getHost(), hostconfig.getPort(), hostconfig.getProtocol()); } else { this.httphost = null; } }
/** * Sets the {@link HostConfiguration host configuration}. * * @param hostconfig The hostConfiguration to set * * @deprecated no longer applicable */ public void setHostConfiguration(final HostConfiguration hostconfig) { if (hostconfig != null) { this.httphost = new HttpHost( hostconfig.getHost(), hostconfig.getPort(), hostconfig.getProtocol()); } else { this.httphost = null; } }
/** * Creates a new HTTP connection for the given host configuration. * * @param hostConfiguration the host/proxy/protocol to use */ public HttpConnection(HostConfiguration hostConfiguration) { this(hostConfiguration.getProxyHost(), hostConfiguration.getProxyPort(), hostConfiguration.getHost(), hostConfiguration.getPort(), hostConfiguration.getProtocol()); this.localAddress = hostConfiguration.getLocalAddress(); }
/** * Creates a new HTTP connection for the given host configuration. * * @param hostConfiguration the host/proxy/protocol to use */ public HttpConnection(HostConfiguration hostConfiguration) { this(hostConfiguration.getProxyHost(), hostConfiguration.getProxyPort(), hostConfiguration.getHost(), hostConfiguration.getPort(), hostConfiguration.getProtocol()); this.localAddress = hostConfiguration.getLocalAddress(); }
/** * Creates a new HTTP connection for the given host configuration. * * @param hostConfiguration the host/proxy/protocol to use */ public HttpConnection(HostConfiguration hostConfiguration) { this(hostConfiguration.getProxyHost(), hostConfiguration.getProxyPort(), hostConfiguration.getHost(), hostConfiguration.getPort(), hostConfiguration.getProtocol()); this.localAddress = hostConfiguration.getLocalAddress(); }
/** * Creates a new HTTP connection for the given host configuration. * * @param hostConfiguration the host/proxy/protocol to use */ public HttpConnection(HostConfiguration hostConfiguration) { this(hostConfiguration.getProxyHost(), hostConfiguration.getProxyPort(), hostConfiguration.getHost(), hostConfiguration.getPort(), hostConfiguration.getProtocol()); this.localAddress = hostConfiguration.getLocalAddress(); }
/** * Creates a new HTTP connection for the given host configuration. * * @param hostConfiguration the host/proxy/protocol to use */ public HttpConnection(HostConfiguration hostConfiguration) { this(hostConfiguration.getProxyHost(), hostConfiguration.getProxyPort(), hostConfiguration.getHost(), hostConfiguration.getPort(), hostConfiguration.getProtocol()); this.localAddress = hostConfiguration.getLocalAddress(); }
/** * Creates a new HTTP connection for the given host configuration. * * @param hostConfiguration the host/proxy/protocol to use */ public HttpConnection(HostConfiguration hostConfiguration) { this(hostConfiguration.getProxyHost(), hostConfiguration.getProxyPort(), hostConfiguration.getHost(), hostConfiguration.getPort(), hostConfiguration.getProtocol()); this.localAddress = hostConfiguration.getLocalAddress(); }
public static URI newURI(HttpMethod m, HostConfiguration conf) throws URIException { String scheme = conf.getProtocol().getScheme(); String host = conf.getHost(); int port = conf.getPort(); return new URIBuilder().getURI(scheme, host, port, m.getPath(), m.getQueryString(), m.getParams()); } }