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, readStartLine
createEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onFill, onFillEof, onPostProcessing, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration, updateState
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLogger, getMessage, getMessageState, getRegistration, isAvailable, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toString
public HttpClientInboundWay(Connection<Client> connection, int bufferSize)
connection
- The parent connection.bufferSize
- The byte buffer size.IOException
public void clear()
Way
clear
in class InboundWay
protected Response createResponse(Status status)
ClientInboundWay
createResponse
in class ClientInboundWay
status
- The response status.public int getLoadScore()
Way
getLoadScore
in class Way
public Queue<Response> getMessages()
protected boolean hasIoInterest()
Way
hasIoInterest
in class Way
public boolean isEmpty()
Way
public void onError(Status status)
Way
onError
in class InboundWay
status
- The error status.public void onMessageCompleted(boolean endDetected) throws IOException
Way
onMessageCompleted
in interface CompletionListener
onMessageCompleted
in class ClientInboundWay
endDetected
- Indicates if the end of the socket channel was detected.IOException
public void onTimeOut()
Way
onTimeOut
in class InboundWay
Copyright © 2005–2015. All rights reserved.