public class InternalNioOutputBuffer extends AbstractInternalOutputBuffer
InternalNioOutputBuffer
Created on Dec 16, 2011 at 9:15:05 AMModifier 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, write
protected NioChannel channel
protected NioEndpoint endpoint
public InternalNioOutputBuffer(Response response, int headerBufferSize, NioEndpoint endpoint)
InternalNioOutputBuffer
response
- headerBufferSize
- endpoint
- protected void init()
AbstractInternalOutputBuffer
init
in class AbstractInternalOutputBuffer
public void setChannel(NioChannel channel)
channel
- public NioChannel getChannel()
public void recycle()
recycle
in class AbstractInternalOutputBuffer
protected int write(long timeout, TimeUnit unit)
AbstractInternalOutputBuffer
nonBlocking
flag.write
in class AbstractInternalOutputBuffer
timeout
- a timeout for the operationunit
- The time unit of the timeoutpublic void sendAck() throws Exception
sendAck
in class AbstractInternalOutputBuffer
Exception
public int doWrite(ByteChunk chunk, Response res) throws IOException
AbstractInternalOutputBuffer
doWrite
in interface OutputBuffer
doWrite
in class AbstractInternalOutputBuffer
chunk
- byte chunkres
- used to allow buffers that can be shared by multiple responses.IOException
- an undelying I/O error occuredprotected void flushBuffer() throws IOException
AbstractInternalOutputBuffer
flushBuffer
in class AbstractInternalOutputBuffer
IOException
public boolean flushLeftover() throws IOException
AbstractInternalOutputBuffer
flushLeftover
in class AbstractInternalOutputBuffer
IOException
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.