Package net.officefloor.server
Interface ResponseWriter
public interface ResponseWriter
Writes the response.
- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescriptionvoidcloseConnection(Throwable failure) Indicates failure processing connection.voidexecute(SocketRunnable runnable) Obtains theStreamBufferPool.voidwrite(ResponseHeaderWriter responseHeaderWriter, StreamBuffer<ByteBuffer> headResponseBuffer) Writes theStreamBufferinstances as the response.
-
Method Details
-
getStreamBufferPool
StreamBufferPool<ByteBuffer> getStreamBufferPool()Obtains theStreamBufferPool.- Returns:
StreamBufferPool.
-
execute
- Parameters:
runnable-SocketRunnable.
-
write
Writes theStreamBufferinstances as the response.- Parameters:
responseHeaderWriter-ResponseHeaderWriter.headResponseBuffer- HeadStreamBufferfor the linked list ofStreamBufferinstances for the response. Once theStreamBufferis written back to theSocket, it is released back to itsStreamBufferPool.
-
closeConnection
Indicates failure processing connection.
Should there be an unrecoverable failure of the connection, this enables closing the connection.
- Parameters:
failure- Cause of the failure.
-