public abstract class HttpConnection extends java.lang.Object implements Connection
Modifier and Type | Field and Description |
---|---|
private HttpDestination |
destination |
private int |
idleTimeoutGuard |
private long |
idleTimeoutStamp |
private static Logger |
LOG |
Modifier | Constructor and Description |
---|---|
protected |
HttpConnection(HttpDestination destination) |
Modifier and Type | Method and Description |
---|---|
private void |
applyProxyAuthentication(Request request,
ProxyConfiguration.Proxy proxy) |
private void |
applyRequestAuthentication(Request request) |
private java.lang.StringBuilder |
convertCookies(java.util.List<java.net.HttpCookie> cookies,
java.lang.StringBuilder builder) |
HttpClient |
getHttpClient() |
HttpDestination |
getHttpDestination() |
protected void |
normalizeRequest(Request request) |
boolean |
onIdleTimeout(long idleTimeout) |
protected SendFailure |
send(HttpChannel channel,
HttpExchange exchange) |
protected abstract SendFailure |
send(HttpExchange exchange) |
void |
send(Request request,
Response.CompleteListener listener)
Sends a request with an associated response listener.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, isClosed
private static final Logger LOG
private final HttpDestination destination
private int idleTimeoutGuard
private long idleTimeoutStamp
protected HttpConnection(HttpDestination destination)
public HttpClient getHttpClient()
public HttpDestination getHttpDestination()
public void send(Request request, Response.CompleteListener listener)
Connection
Request.send(Response.CompleteListener)
will eventually call this method to send the request.
It is exposed to allow applications to send requests via unpooled connections.
send
in interface Connection
request
- the request to sendlistener
- the response listenerprotected abstract SendFailure send(HttpExchange exchange)
protected void normalizeRequest(Request request)
private java.lang.StringBuilder convertCookies(java.util.List<java.net.HttpCookie> cookies, java.lang.StringBuilder builder)
private void applyRequestAuthentication(Request request)
private void applyProxyAuthentication(Request request, ProxyConfiguration.Proxy proxy)
protected SendFailure send(HttpChannel channel, HttpExchange exchange)
public boolean onIdleTimeout(long idleTimeout)
public java.lang.String toString()
toString
in class java.lang.Object