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, setEntityRegistration
canLoop, 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, toString
public 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()
Way
getActualMessage
in class Way
public Connection<Server> getConnection()
Way
getConnection
in class Way
public ServerConnectionHelper getHelper()
Way
protected boolean hasIoInterest()
Way
hasIoInterest
in class Way
protected void onHeadersCompleted() throws IOException
InboundWay
onHeadersCompleted
in class InboundWay
IOException
protected void onReceived(Response message) throws IOException
onReceived
in class InboundWay
message
- The new message received.IOException
protected void readStartLine() throws IOException
InboundWay
readStartLine
in class InboundWay
IOException
public void updateState()
Way
updateState
in class InboundWay
Copyright © 2005–2017. All rights reserved.