com.sun.grizzly.arp
Class AsynchronousOutputBuffer
java.lang.Object
com.sun.grizzly.tcp.http11.InternalOutputBuffer
com.sun.grizzly.http.SocketChannelOutputBuffer
com.sun.grizzly.arp.AsynchronousOutputBuffer
- All Implemented Interfaces:
- FileOutputBuffer, OutputBuffer, ByteChunk.ByteOutputChannel
public class AsynchronousOutputBuffer
- extends SocketChannelOutputBuffer
Thread-Safe SocketChannelOutputBuffer
used when Comet is used.
Fields inherited from class com.sun.grizzly.http.SocketChannelOutputBuffer |
ACK, asyncHttpByteBufferCloner, asyncQueueWriter, bufferPool, channel, DEFAULT_BUFFER_POOL_SIZE, isAsyncHttpWriteEnabled, logger, MAX_BUFFERED_BYTES, maxBufferedBytes, maxBufferPoolSize, outputByteBuffer, selectionKey |
Fields inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer |
activeFilters, buf, committed, filterLibrary, finished, headers, lastActiveFilter, outputStream, outputStreamOutputBuffer, pos, response, socketBuffer, useSocketBuffer |
Methods inherited from class com.sun.grizzly.http.SocketChannelOutputBuffer |
createByteBuffer, endRequest, getAsyncQueueWriter, getChannel, getMaxBufferedBytes, getMaxBufferPoolSize, getSelectionKey, isAsyncHttpWriteEnabled, isSupportFileSend, recycle, reset, sendAck, sendFile, setAsyncHttpWriteEnabled, setAsyncQueueWriter, setChannel, setMaxBufferedBytes, setMaxBufferPoolSize, setSelectionKey |
Methods inherited from class com.sun.grizzly.tcp.http11.InternalOutputBuffer |
addActiveFilter, addFilter, addLastOutputFilter, clearFilters, commit, doWrite, endHeaders, getFilters, getOutputStream, nextRequest, 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 |
AsynchronousOutputBuffer
public AsynchronousOutputBuffer(Response response,
int headerBufferSize,
boolean useSocketBuffer)
- Alternate constructor.
realWriteBytes
public void realWriteBytes(byte[] cbuf,
int off,
int len)
throws IOException
- Description copied from class:
SocketChannelOutputBuffer
- Callback to write data from the buffer.
- Specified by:
realWriteBytes
in interface ByteChunk.ByteOutputChannel
- Overrides:
realWriteBytes
in class SocketChannelOutputBuffer
- Throws:
IOException
flushChannel
public void flushChannel(ByteBuffer bb)
throws IOException
- Description copied from class:
SocketChannelOutputBuffer
- Flush the buffer by looping until the
ByteBuffer
is empty
- Overrides:
flushChannel
in class SocketChannelOutputBuffer
- Parameters:
bb
- the ByteBuffer to write.
- Throws:
IOException
flush
public void flush()
throws IOException
- Description copied from class:
SocketChannelOutputBuffer
- Flush the buffered bytes,
- Overrides:
flush
in class SocketChannelOutputBuffer
- Throws:
IOException
flushBuffer
public void flushBuffer()
throws IOException
- Description copied from class:
SocketChannelOutputBuffer
- Writes bytes to the underlying channel.
- Overrides:
flushBuffer
in class SocketChannelOutputBuffer
- Throws:
IOException
Copyright © 2009 SUN Microsystems. All Rights Reserved.