public abstract class ClientInboundWay extends InboundWay
| Constructor and Description |
|---|
ClientInboundWay(Connection<?> connection,
int bufferSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyResponseTransportHeaders(Series<Header> headers,
Response response)
Copies headers into a response.
|
protected abstract Response |
createResponse(Status status)
Creates a response object for the given status.
|
protected Status |
createStatus(int code)
Returns the status corresponding to a given status code.
|
Message |
getActualMessage()
Returns the actual message, request or response.
|
Connection<Client> |
getConnection()
Returns the parent connection.
|
ClientConnectionHelper |
getHelper()
Returns the parent connector helper.
|
int |
getInterestOperations()
Returns the operations of interest.
|
protected void |
onHeadersCompleted()
Callback invoked when a message has been received.
|
void |
onMessageCompleted(boolean endDetected)
Callback method invoked when the current message has been completely
received or sent.
|
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.
|
clear, createEntity, fillLine, getBuilderIndex, getEntityRegistration, isLineReadable, onDrain, onError, onFill, onFillEof, onPostProcessing, onTimeOut, processIoBuffer, readHeader, setBuilderIndex, setEntityRegistration, updateStatecanLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getIoState, getLineBuilder, getLineBuilderState, getLoadScore, getLogger, getMessage, getMessageState, getRegistration, hasIoInterest, isAvailable, isEmpty, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toStringpublic ClientInboundWay(Connection<?> connection, int bufferSize)
connection - The parent connection.bufferSize - The byte buffer size.protected void copyResponseTransportHeaders(Series<Header> headers, Response response)
headers - The headers to copy.response - The response to update.protected abstract Response createResponse(Status status)
status - The response status.protected Status createStatus(int code)
code - The status code.public Message getActualMessage()
WaygetActualMessage in class Waypublic Connection<Client> getConnection()
WaygetConnection in class Waypublic ClientConnectionHelper getHelper()
Waypublic int getInterestOperations()
WaygetInterestOperations in class InboundWayprotected void onHeadersCompleted()
throws IOException
InboundWayonHeadersCompleted in class InboundWayIOExceptionpublic void onMessageCompleted(boolean endDetected)
throws IOException
WayonMessageCompleted in interface CompletionListeneronMessageCompleted in class InboundWayendDetected - Indicates if the end of the socket channel was detected.IOExceptionprotected void onReceived(Response message) throws IOException
InboundWayonReceived in class InboundWaymessage - The new message received.IOExceptionprotected void readStartLine()
throws IOException
InboundWayreadStartLine in class InboundWayIOExceptionCopyright © 2005–2015. All rights reserved.