|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.tcp.http11.InternalOutputBuffer
com.sun.grizzly.http.SocketChannelOutputBuffer
public class SocketChannelOutputBuffer
Output buffer.
Buffer the bytes until the ByteChunk
is full or the request
is completed.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer |
---|
InternalOutputBuffer.OutputStreamOutputBuffer |
Field Summary | |
---|---|
protected SocketChannel |
socketChannel
Underlying output socketChannel. |
Fields inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer |
---|
activeFilters, buf, committed, filterLibrary, finished, headers, lastActiveFilter, outputStream, outputStreamOutputBuffer, pos, response, sm, socketBuffer, useSocketBuffer |
Constructor Summary | |
---|---|
SocketChannelOutputBuffer(Response response,
int headerBufferSize,
boolean useSocketBuffer)
Alternate constructor. |
Method Summary | |
---|---|
void |
endRequest()
End request. |
void |
flush()
Flush the buffered bytes, |
void |
flushBuffer()
Writes bytes to the underlying socketChannel. |
void |
flushChannel(ByteBuffer bb)
Flush the buffer by looping until the ByteBuffer is empty |
SocketChannel |
getChannel()
Return the underlying SocketChannel |
static int |
getMaxBufferedBytes()
|
void |
realWriteBytes(byte[] cbuf,
int off,
int len)
Callback to write data from the buffer. |
void |
recycle()
Recycle the output buffer. |
void |
sendAck()
Send an acknoledgement without buffering. |
void |
setChannel(SocketChannel socketChannel)
Set the underlying socket output stream. |
static void |
setMaxBufferedBytes(int aMaxBufferedBytes)
|
Methods inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer |
---|
addActiveFilter, addFilter, clearFilters, commit, doWrite, endHeaders, getFilters, getOutputStream, nextRequest, reset, sendHeader, sendHeader, sendHeader, sendStatus, setOutputStream, setSocketBuffer, write, write, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SocketChannel socketChannel
Constructor Detail |
---|
public SocketChannelOutputBuffer(Response response, int headerBufferSize, boolean useSocketBuffer)
Method Detail |
---|
public void setChannel(SocketChannel socketChannel)
public SocketChannel getChannel()
public void sendAck() throws IOException
sendAck
in class InternalOutputBuffer
IOException
public void realWriteBytes(byte[] cbuf, int off, int len) throws IOException
realWriteBytes
in interface ByteChunk.ByteOutputChannel
realWriteBytes
in class InternalOutputBuffer
IOException
public void flushChannel(ByteBuffer bb) throws IOException
ByteBuffer
is empty
bb
- the ByteBuffer to write.
IOException
public void flush() throws IOException
flush
in class InternalOutputBuffer
IOException
- an undelying I/O error occuredpublic void endRequest() throws IOException
endRequest
in class InternalOutputBuffer
IOException
- an undelying I/O error occuredpublic void flushBuffer() throws IOException
IOException
public void recycle()
recycle
in class InternalOutputBuffer
public static int getMaxBufferedBytes()
public static void setMaxBufferedBytes(int aMaxBufferedBytes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |