public abstract class HttpConnection extends java.lang.Object implements Connection, Attachable
Modifier | Constructor and Description |
---|---|
protected |
HttpConnection(HttpDestination destination) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getAttachment() |
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.
|
void |
setAttachment(java.lang.Object obj)
Attaches the given object to this stream for later retrieval.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
close, isClosed
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)
protected SendFailure send(HttpChannel channel, HttpExchange exchange)
public boolean onIdleTimeout(long idleTimeout)
public void setAttachment(java.lang.Object obj)
Attachable
setAttachment
in interface Attachable
obj
- the object to attach to this instancepublic java.lang.Object getAttachment()
getAttachment
in interface Attachable
Attachable.setAttachment(Object)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1995–2021 Webtide. All rights reserved.