public class HttpConnectionOverHTTP extends AbstractConnection implements Connection
AbstractConnection.FillingInterestedCallback, AbstractConnection.NestedState, AbstractConnection.State
Connection.Listener
EXECUTE_ONFILLABLE, FILL_INTERESTED, FILLING, FILLING_FILL_INTERESTED, IDLE, REFILLING
Constructor and Description |
---|
HttpConnectionOverHTTP(EndPoint endPoint,
HttpDestination destination) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Performs a logical close of this connection.
|
protected void |
close(Throwable failure) |
HttpChannelOverHTTP |
getHttpChannel() |
HttpDestinationOverHTTP |
getHttpDestination() |
boolean |
isClosed() |
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 |
release() |
protected void |
send(HttpExchange exchange) |
void |
send(Request request,
Response.CompleteListener listener)
Sends a request with an associated response listener.
|
boolean |
softClose() |
String |
toString() |
addListener, failedCallback, fillInterested, fillInterested, getBytesIn, getBytesOut, getCreatedTimeStamp, getEndPoint, getExecutor, getInputBufferSize, getMessagesIn, getMessagesOut, next, onClose, onFillInterestedFailed, setInputBufferSize
public HttpConnectionOverHTTP(EndPoint endPoint, HttpDestination destination)
public HttpChannelOverHTTP getHttpChannel()
public HttpDestinationOverHTTP 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.request
- the request to sendlistener
- the response listenerprotected void send(HttpExchange exchange)
public void onOpen()
Connection
Callback method invoked when this Connection
is opened.
Creators of the connection implementation are responsible for calling this method.
onOpen
in interface Connection
onOpen
in class AbstractConnection
public boolean isClosed()
protected boolean onReadTimeout()
AbstractConnection
Callback method invoked when the endpoint failed to be ready to be read after a timeout
onReadTimeout
in class AbstractConnection
public void onFillable()
AbstractConnection
Callback method invoked when the endpoint is ready to be read.
onFillable
in class AbstractConnection
AbstractConnection.fillInterested()
public void release()
public void close()
Connection
Performs 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 Closeable
close
in interface AutoCloseable
close
in interface Connection
close
in class AbstractConnection
protected void close(Throwable failure)
public boolean softClose()
public String toString()
toString
in class AbstractConnection
Copyright © 1995-2015 Webtide. All Rights Reserved.