Code example for HttpHost

Methods: getHostNamegetPort

0
        return new LoggingBHttpClientConnection(8 * 1024); 
    } 
 
    public void connect(final HttpHost host, final DefaultBHttpClientConnection conn) throws IOException {
        final Socket socket = new Socket();
        socket.connect(new InetSocketAddress(host.getHostName(), host.getPort()), this.timeout);
        conn.bind(socket);
        conn.setSocketTimeout(this.timeout);
    } 
 
    public HttpResponse execute(
            final HttpRequest request,
            final HttpHost targetHost,
            final HttpClientConnection conn) throws HttpException, IOException {
        this.context.setTargetHost(targetHost);
        this.httpexecutor.preProcess(request, this.httpproc, this.context);
        final HttpResponse response = this.httpexecutor.execute(request, conn, this.context);
        this.httpexecutor.postProcess(response, this.httpproc, this.context);
        return response;
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE