public class HttpClientConnection extends Object implements TimedConnection
Constructor and Description |
---|
HttpClientConnection(String host,
int port,
HttpClientSocketFactory factory,
HttpClientManager manager)
Creates HttpClientConnection which sends requests directly to given
host/port through a socket obtained from the given socket factory.
|
HttpClientConnection(String targetHost,
int targetPort,
String proxyHost,
int proxyPort,
boolean tunnel,
boolean persist,
HttpClientSocketFactory factory,
HttpClientManager manager)
Creates HttpClientConnection which sends requests to given target
host/port through the indicated HTTP proxy over a socket provided by the
specified socket factory.
|
Modifier and Type | Method and Description |
---|---|
Socket |
getSocket()
Returns socket over which requests are sent.
|
protected void |
idle()
Upcall indicating that connection has become idle.
|
OutboundRequest |
newRequest()
Initiates new request to connection target.
|
boolean |
ping()
Pings target.
|
boolean |
shutdown(boolean force)
Attempts to shut down connection, returning true if connection is
closed.
|
public HttpClientConnection(String host, int port, HttpClientSocketFactory factory, HttpClientManager manager) throws IOException
IOException
public HttpClientConnection(String targetHost, int targetPort, String proxyHost, int proxyPort, boolean tunnel, boolean persist, HttpClientSocketFactory factory, HttpClientManager manager) throws IOException
IOException
public boolean ping() throws IOException
IOException
public OutboundRequest newRequest() throws IOException
IOException
protected void idle()
public Socket getSocket()
public boolean shutdown(boolean force)
shutdown
in interface TimedConnection
Copyright © 2016–2018. All rights reserved.