public abstract class ServerOutboundWay extends OutboundWay
Constructor and Description |
---|
ServerOutboundWay(Connection<Server> connection,
int bufferSize)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addHeaders(Series<Header> headers)
Add all the headers, including the general, the message specific and the
entity headers.
|
protected void |
addResponseHeaders(Series<Header> headers)
Adds the response headers.
|
Response |
getActualMessage()
Returns the actual message, request or response.
|
Connection<Server> |
getConnection()
Returns the parent connection.
|
void |
onMessageCompleted(boolean endDetected)
Callback method invoked when the current message has been completely
received or sent.
|
protected void |
writeStartLine()
Writes the start line of the current outbound message.
|
addEntityHeaders, addGeneralHeaders, clear, flushBuffer, getEntityChannel, getEntityChannelType, getEntityFileChannel, getEntityInterestOps, getEntitySelectableChannel, getEntitySelectionKey, getHeaderIndex, getInterestOperations, getVersion, handle, hasIoInterest, onDrain, onError, onFill, onFillEof, onHeadersCompleted, onPostProcessing, onTimeOut, processIoBuffer, setEntityChannel, setEntityChannelType, setEntitySelectionKey, setHeaderIndex, shouldBeChunked, updateState, writeLine
canLoop, clearLineBuilder, couldDrain, couldFill, getBuffer, getHeaders, getHelper, getIoState, getLineBuilder, getLineBuilderState, getLoadScore, getLogger, getMessage, getMessageState, getRegistration, isAvailable, isEmpty, onClosed, onSelected, postProcess, preProcess, setHeaders, setIoState, setLineBuilderState, setMessage, setMessageState, setRegistration, toString
public ServerOutboundWay(Connection<Server> connection, int bufferSize)
connection
- The parent connection.bufferSize
- The byte buffer size.protected void addHeaders(Series<Header> headers)
OutboundWay
addHeaders
in class OutboundWay
headers
- The headers to update.protected void addResponseHeaders(Series<Header> headers)
headers
- The headers series to update.public Response getActualMessage()
Way
getActualMessage
in class Way
public Connection<Server> getConnection()
Way
getConnection
in class Way
public void onMessageCompleted(boolean endDetected) throws IOException
Way
onMessageCompleted
in interface CompletionListener
onMessageCompleted
in class OutboundWay
endDetected
- Indicates if the end of the socket channel was detected.IOException
protected void writeStartLine() throws IOException
OutboundWay
writeStartLine
in class OutboundWay
IOException
Copyright © 2005–2014. All rights reserved.