public class InternalNioOutputBuffer extends AbstractInternalOutputBuffer
InternalNioOutputBuffer
Created on Dec 16, 2011 at 9:15:05 AM| Modifier and Type | Field and Description |
|---|---|
protected NioChannel |
channel
Underlying channel.
|
protected NioEndpoint |
endpoint
NIO endpoint.
|
activeFilters, bbuf, buf, committed, filterLibrary, finished, headers, lastActiveFilter, leftover, nonBlocking, outputBuffer, pos, response, writeTimeout| Constructor and Description |
|---|
InternalNioOutputBuffer(Response response,
int headerBufferSize,
NioEndpoint endpoint)
Create a new instance of
InternalNioOutputBuffer |
| Modifier and Type | Method and Description |
|---|---|
int |
doWrite(ByteChunk chunk,
Response res)
Write the contents of a byte chunk.
|
protected void |
flushBuffer()
Callback to write data from the buffer.
|
boolean |
flushLeftover()
Flush leftover bytes.
|
NioChannel |
getChannel()
Get the underlying socket input stream.
|
protected void |
init()
Initialize the internal output buffer
|
void |
recycle()
Recycle the output buffer.
|
void |
sendAck()
Send an acknowledgment.
|
void |
setChannel(NioChannel channel)
Set the underlying socket.
|
protected int |
write(long timeout,
TimeUnit unit)
Perform a write operation.
|
addActiveFilter, addFilter, clearBuffer, clearFilters, commit, endHeaders, endRequest, flush, getFilters, getNonBlocking, nextRequest, removeActiveFilters, sendHeader, sendHeader, sendHeader, sendStatus, setNonBlocking, write, write, write, write, write, writeprotected NioChannel channel
protected NioEndpoint endpoint
public InternalNioOutputBuffer(Response response, int headerBufferSize, NioEndpoint endpoint)
InternalNioOutputBufferresponse - headerBufferSize - endpoint - protected void init()
AbstractInternalOutputBufferinit in class AbstractInternalOutputBufferpublic void setChannel(NioChannel channel)
channel - public NioChannel getChannel()
public void recycle()
recycle in class AbstractInternalOutputBufferprotected int write(long timeout,
TimeUnit unit)
AbstractInternalOutputBuffernonBlocking flag.write in class AbstractInternalOutputBuffertimeout - a timeout for the operationunit - The time unit of the timeoutpublic void sendAck()
throws Exception
sendAck in class AbstractInternalOutputBufferExceptionpublic int doWrite(ByteChunk chunk, Response res) throws IOException
AbstractInternalOutputBufferdoWrite in interface OutputBufferdoWrite in class AbstractInternalOutputBufferchunk - byte chunkres - used to allow buffers that can be shared by multiple responses.IOException - an undelying I/O error occuredprotected void flushBuffer()
throws IOException
AbstractInternalOutputBufferflushBuffer in class AbstractInternalOutputBufferIOExceptionpublic boolean flushLeftover()
throws IOException
AbstractInternalOutputBufferflushLeftover in class AbstractInternalOutputBufferIOExceptionCopyright © 2016 JBoss by Red Hat. All rights reserved.