public class HttpServerInboundWay extends ServerInboundWay
| Constructor and Description |
|---|
HttpServerInboundWay(Connection<Server> connection,
int bufferSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Recycles the way so it can be reused.
|
protected Response |
createResponse(Request request)
Creates a response object for the given request.
|
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 |
isAvailable()
Indicates if the way is available to handle new messages.
|
boolean |
isEmpty()
Indicates if the way is empty.
|
void |
onError(Status status)
Called on error.
|
protected void |
onReceived(Response message)
Call back invoked when the message is received.
|
void |
onTimeOut()
Called back by the controller when an IO time out has been detected.
|
getActualMessage, getConnection, getHelper, onHeadersCompleted, readStartLine, updateStatecreateEntity, fillLine, getBuilderIndex, getEntityRegistration, getInterestOperations, isLineReadable, onDrain, onFill, onFillEof, onMessageCompleted, onPostProcessing, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistrationcanLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLogger, getMessage, getMessageState, getRegistration, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toStringpublic HttpServerInboundWay(Connection<Server> connection, int bufferSize)
connection - The parent connection.bufferSize - The byte buffer size.public void clear()
Wayclear in class InboundWayprotected Response createResponse(Request request)
ServerInboundWaycreateResponse in class ServerInboundWayrequest - The parent request.public int getLoadScore()
WaygetLoadScore in class Waypublic Queue<Response> getMessages()
protected boolean hasIoInterest()
WayhasIoInterest in class ServerInboundWaypublic boolean isAvailable()
WayisAvailable in class Waypublic boolean isEmpty()
Waypublic void onError(Status status)
WayonError in class InboundWaystatus - The error status.protected void onReceived(Response message) throws IOException
ServerInboundWayonReceived in class ServerInboundWaymessage - The new message received.IOExceptionpublic void onTimeOut()
WayonTimeOut in class InboundWayCopyright © 2005–2016. All rights reserved.