public class HttpClientInboundWay extends ClientInboundWay
| Constructor and Description |
|---|
HttpClientInboundWay(Connection<Client> connection,
int bufferSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Recycles the way so it can be reused.
|
protected Response |
createResponse(Status status)
Creates a response object for the given status.
|
int |
getLoadScore()
Returns a score representing the way load and that could be compared with
other ways of the same parent connection.
|
Queue<Response> |
getMessages()
Returns the queue of messages.
|
protected boolean |
hasIoInterest()
Indicates if we want to be selected for IO processing when the socket
related socket is prepared.
|
boolean |
isEmpty()
Indicates if the way is empty.
|
void |
onError(Status status)
Called on error.
|
void |
onMessageCompleted(boolean endDetected)
Callback method invoked when the current message has been completely
received or sent.
|
void |
onTimeOut()
Called back by the controller when an IO time out has been detected.
|
copyResponseTransportHeaders, createStatus, getActualMessage, getConnection, getHelper, getInterestOperations, onHeadersCompleted, onReceived, readStartLinecreateEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onFill, onFillEof, onPostProcessing, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration, updateStatecanLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLogger, getMessage, getMessageState, getRegistration, isAvailable, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toStringpublic HttpClientInboundWay(Connection<Client> connection, int bufferSize)
connection - The parent connection.bufferSize - The byte buffer size.IOExceptionpublic void clear()
Wayclear in class InboundWayprotected Response createResponse(Status status)
ClientInboundWaycreateResponse in class ClientInboundWaystatus - The response status.public int getLoadScore()
WaygetLoadScore in class Waypublic Queue<Response> getMessages()
protected boolean hasIoInterest()
WayhasIoInterest in class Waypublic boolean isEmpty()
Waypublic void onError(Status status)
WayonError in class InboundWaystatus - The error status.public void onMessageCompleted(boolean endDetected)
throws IOException
WayonMessageCompleted in interface CompletionListeneronMessageCompleted in class ClientInboundWayendDetected - Indicates if the end of the socket channel was detected.IOExceptionpublic void onTimeOut()
WayonTimeOut in class InboundWayCopyright © 2005–2016. All rights reserved.