|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.coyote.http11.InternalOutputBuffer
com.sun.enterprise.web.connector.grizzly.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 org.apache.coyote.http11.InternalOutputBuffer |
|---|
InternalOutputBuffer.OutputStreamOutputBuffer |
| Field Summary | |
|---|---|
protected SocketChannel |
socketChannel
Underlying output socketChannel. |
| Fields inherited from class org.apache.coyote.http11.InternalOutputBuffer |
|---|
activeFilters, buf, committed, filterLibrary, finished, headers, lastActiveFilter, log, 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 org.apache.coyote.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 InternalOutputBufferIOException
public void realWriteBytes(byte[] cbuf,
int off,
int len)
throws IOException
realWriteBytes in interface ByteChunk.ByteOutputChannelrealWriteBytes in class InternalOutputBufferIOException
public void flushChannel(ByteBuffer bb)
throws IOException
ByteBuffer is empty
bb - the ByteBuffer to write.
IOException
public void flush()
throws IOException
flush in class InternalOutputBufferIOException - an undelying I/O error occured
public void endRequest()
throws IOException
endRequest in class InternalOutputBufferIOException - an undelying I/O error occured
public void flushBuffer()
throws IOException
IOExceptionpublic void recycle()
recycle in class InternalOutputBufferpublic 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 | |||||||||