public class HttpConnection extends AbstractConnection implements Connection
Connection.ListenerEXECUTE_ONFILLABLE| Constructor and Description |
|---|
HttpConnection(HttpClient client,
EndPoint endPoint,
HttpDestination destination) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
abort(Throwable cause) |
protected void |
associate(HttpExchange exchange) |
void |
close()
Performs a logical close of this connection.
|
void |
complete(HttpExchange exchange,
boolean success) |
protected HttpExchange |
disassociate() |
HttpDestination |
getDestination() |
HttpExchange |
getExchange() |
HttpClient |
getHttpClient() |
protected void |
idleTimeout() |
void |
onFillable()
Callback method invoked when the endpoint is ready to be read.
|
void |
onOpen()
Callback method invoked when this
Connection is opened. |
protected boolean |
onReadTimeout()
Callback method invoked when the endpoint failed to be ready to be read after a timeout
|
void |
proceed(boolean proceed) |
protected void |
receive() |
void |
send(HttpExchange exchange) |
void |
send(Request request,
Response.CompleteListener listener)
Sends a request with an associated response listener.
|
String |
toString() |
addListener, block, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, onClose, onFillInterestedFailed, setInputBufferSizepublic HttpConnection(HttpClient client, EndPoint endPoint, HttpDestination destination)
public HttpClient getHttpClient()
public HttpDestination getDestination()
public void onOpen()
ConnectionCallback method invoked when this Connection is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen in interface ConnectiononOpen in class AbstractConnectionprotected boolean onReadTimeout()
AbstractConnectionCallback method invoked when the endpoint failed to be ready to be read after a timeout
onReadTimeout in class AbstractConnectionprotected void idleTimeout()
public void send(Request request, Response.CompleteListener listener)
ConnectionRequest#send(Response.Listener) will eventually call this method to send the request.
It is exposed to allow applications to send requests via unpooled connections.request - the request to sendlistener - the response listenerpublic void send(HttpExchange exchange)
public HttpExchange getExchange()
protected void associate(HttpExchange exchange)
protected HttpExchange disassociate()
public void onFillable()
AbstractConnectionCallback method invoked when the endpoint is ready to be read.
onFillable in class AbstractConnectionAbstractConnection.fillInterested()protected void receive()
public void complete(HttpExchange exchange, boolean success)
public boolean abort(Throwable cause)
public void proceed(boolean proceed)
public void close()
ConnectionPerforms a logical close of this connection.
For simple connections, this may just mean to delegate the close to the associated
EndPoint but, for example, SSL connections should write the SSL close message
before closing the associated EndPoint.
close in interface Closeableclose in interface AutoCloseableclose in interface Connectionclose in class AbstractConnectionpublic String toString()
toString in class AbstractConnectionCopyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.