Package net.officefloor.server
Interface ResponseWriter
-
public interface ResponseWriter
Writes the response.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
closeConnection(java.lang.Throwable failure)
Indicates failure processing connection.void
execute(SocketRunnable runnable)
StreamBufferPool<java.nio.ByteBuffer>
getStreamBufferPool()
Obtains theStreamBufferPool
.void
write(ResponseHeaderWriter responseHeaderWriter, StreamBuffer<java.nio.ByteBuffer> headResponseBuffer)
Writes theStreamBuffer
instances as the response.
-
-
-
Method Detail
-
getStreamBufferPool
StreamBufferPool<java.nio.ByteBuffer> getStreamBufferPool()
Obtains theStreamBufferPool
.- Returns:
StreamBufferPool
.
-
execute
void execute(SocketRunnable runnable)
- Parameters:
runnable
-SocketRunnable
.
-
write
void write(ResponseHeaderWriter responseHeaderWriter, StreamBuffer<java.nio.ByteBuffer> headResponseBuffer)
Writes theStreamBuffer
instances as the response.- Parameters:
responseHeaderWriter
-ResponseHeaderWriter
.headResponseBuffer
- HeadStreamBuffer
for the linked list ofStreamBuffer
instances for the response. Once theStreamBuffer
is written back to theSocket
, it is released back to itsStreamBufferPool
.
-
closeConnection
void closeConnection(java.lang.Throwable failure)
Indicates failure processing connection.
Should there be an unrecoverable failure of the connection, this enables closing the connection.
- Parameters:
failure
- Cause of the failure.
-
-