public abstract class ServerInboundWay extends InboundWay
| Constructor and Description |
|---|
ServerInboundWay(Connection<?> connection,
int bufferSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract Response |
createResponse(Request request)
Creates a response object for the given request.
|
Message |
getActualMessage()
Returns the actual message, request or response.
|
Connection<Server> |
getConnection()
Returns the parent connection.
|
ServerConnectionHelper |
getHelper()
Returns the parent connector helper.
|
protected boolean |
hasIoInterest()
Indicates if we want to be selected for IO processing when the socket
related socket is prepared.
|
protected void |
onHeadersCompleted()
Callback invoked when a message has been received.
|
protected void |
onReceived(Response message)
Call back invoked when the message is received.
|
protected void |
readStartLine()
Read the start line of the current message received.
|
void |
updateState()
Updates the way IO and message states.
|
clear, createEntity, fillLine, getBuilderIndex, getEntityRegistration, getInterestOperations, isLineReadable, onDrain, onError, onFill, onFillEof, onMessageCompleted, onPostProcessing, onTimeOut, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistrationcanLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLoadScore, getLogger, getMessage, getMessageState, getRegistration, isAvailable, isEmpty, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toStringpublic ServerInboundWay(Connection<?> connection, int bufferSize)
connection - The parent connection.bufferSize - The byte buffer size.protected abstract Response createResponse(Request request)
request - The parent request.public Message getActualMessage()
WaygetActualMessage in class Waypublic Connection<Server> getConnection()
WaygetConnection in class Waypublic ServerConnectionHelper getHelper()
Wayprotected boolean hasIoInterest()
WayhasIoInterest in class Wayprotected void onHeadersCompleted()
throws IOException
InboundWayonHeadersCompleted in class InboundWayIOExceptionprotected void onReceived(Response message) throws IOException
onReceived in class InboundWaymessage - The new message received.IOExceptionprotected void readStartLine()
throws IOException
InboundWayreadStartLine in class InboundWayIOExceptionpublic void updateState()
WayupdateState in class InboundWayCopyright © 2005–2015. All rights reserved.