| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private final HttpServerConnection | |
| private boolean | |
| private HttpServerExchange | |
| private long | |
| private static final int | |
| private HeaderValues | |
| private static final int | |
| private final ByteBufferPool | |
| private static final int | |
| private PooledByteBuffer | |
| private PooledByteBuffer | |
| private int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private String | |
| private int | |
| private ByteBuffer[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | HttpResponseConduit(final StreamSinkConduit next, final ByteBufferPool pool, HttpServerConnection connection)
|
| pack-priv | HttpResponseConduit(final StreamSinkConduit next, final ByteBufferPool pool, HttpServerConnection connection, HttpServerExchange exchange)
|
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public boolean | flush()
Overrides org. Implements org. Flush out any unwritten, buffered output. |
| private boolean | flushHeaderBuffer(ByteBuffer buffer, String string, HeaderValues headerValues, int charIndex, long fiCookie, int valueIdx)
|
| pack-priv void | |
| public void | |
| public XnioWorker | getWorker()
Overrides org. Implements org. Get the XNIO worker associated with this conduit. |
| private int | processStatefulWrite(int state, final Object userData, int pos, int len)
Handles writing out the header data in the case where is is too big to fit into a buffer. |
| private int | processWrite(int state, final Object userData, int pos, int length)
Handles writing out the header data. |
| pack-priv void | |
| public void | terminateWrites()
Overrides org. Implements org. Signal that no more write data is forthcoming. |
| public long | transferFrom(final FileChannel
the file to read from src, final long the position within the file from which the transfer is to begin position, final long the number of bytes to be transferred count)Overrides org. Implements org. Transfer bytes into this conduit from the given file. |
| public long | transferFrom(final StreamSourceChannel
the source to read from source, final long the number of bytes to be transferred count, final ByteBuffer the buffer to copy through. throughBuffer)Overrides org. Implements org. Transfers bytes from the given channel source. |
| public void | truncateWrites()
Overrides org. Implements org. Terminate writes and discard any outstanding write data. |
| public int | write(final ByteBuffer
the buffer containing data to write src)Overrides org. Implements org. Writes a sequence of bytes to this conduit from the given buffer. |
| public long | |
| public long | write(final ByteBuffer[]
the buffers containing data to write srcs, final int the offset into the buffer array offset, final int the number of buffers to write length)Overrides org. Implements org. Writes a sequence of bytes to this conduit from the given buffers. |
| public int | writeFinal(ByteBuffer
The data to write src)Overrides org. Implements org. Writes some data to the conduit, with the same semantics as
|
| public long | writeFinal(ByteBuffer[]
The buffers from which bytes are to be retrieved srcs, int The offset within the buffer array of the first buffer from
which bytes are to be retrieved; must be non-negative and no
larger than srcs.length offset, int The maximum number of buffers to be accessed; must be
non-negative and no larger than
srcs.length - offset length)Overrides org. Implements org. Writes some data to the conduit, with the same semantics as
|
| private static void |
| charIndex | back to summary |
|---|---|
| private int charIndex | |
| connection | back to summary |
|---|---|
| private final HttpServerConnection connection | |
| done | back to summary |
|---|---|
| private boolean done | |
| exchange | back to summary |
|---|---|
| private HttpServerExchange exchange | |
| fiCookie | back to summary |
|---|---|
| private long fiCookie | |
| FLAG_SHUTDOWN | back to summary |
|---|---|
| private static final int FLAG_SHUTDOWN | |
| headerValues | back to summary |
|---|---|
| private HeaderValues headerValues | |
| MASK_STATE | back to summary |
|---|---|
| private static final int MASK_STATE | |
| pool | back to summary |
|---|---|
| private final ByteBufferPool pool | |
| POOLED_BUFFER_IN_USE | back to summary |
|---|---|
| private static final int POOLED_BUFFER_IN_USE | |
| pooledBuffer | back to summary |
|---|---|
| private PooledByteBuffer pooledBuffer | |
| pooledFileTransferBuffer | back to summary |
|---|---|
| private PooledByteBuffer pooledFileTransferBuffer | |
| state | back to summary |
|---|---|
| private int state | |
| STATE_BODY | back to summary |
|---|---|
| private static final int STATE_BODY | |
| STATE_BUF_FLUSH | back to summary |
|---|---|
| private static final int STATE_BUF_FLUSH | |
| STATE_HDR_D | back to summary |
|---|---|
| private static final int STATE_HDR_D | |
| STATE_HDR_DS | back to summary |
|---|---|
| private static final int STATE_HDR_DS | |
| STATE_HDR_EOL_CR | back to summary |
|---|---|
| private static final int STATE_HDR_EOL_CR | |
| STATE_HDR_EOL_LF | back to summary |
|---|---|
| private static final int STATE_HDR_EOL_LF | |
| STATE_HDR_FINAL_CR | back to summary |
|---|---|
| private static final int STATE_HDR_FINAL_CR | |
| STATE_HDR_FINAL_LF | back to summary |
|---|---|
| private static final int STATE_HDR_FINAL_LF | |
| STATE_HDR_NAME | back to summary |
|---|---|
| private static final int STATE_HDR_NAME | |
| STATE_HDR_VAL | back to summary |
|---|---|
| private static final int STATE_HDR_VAL | |
| STATE_START | back to summary |
|---|---|
| private static final int STATE_START | |
| string | back to summary |
|---|---|
| private String string | |
| valueIdx | back to summary |
|---|---|
| private int valueIdx | |
| writevBuffer | back to summary |
|---|---|
| private ByteBuffer[] writevBuffer | |
| HttpResponseConduit | back to summary |
|---|---|
| pack-priv HttpResponseConduit(final StreamSinkConduit next, final ByteBufferPool pool, HttpServerConnection connection) | |
| HttpResponseConduit | back to summary |
|---|---|
| pack-priv HttpResponseConduit(final StreamSinkConduit next, final ByteBufferPool pool, HttpServerConnection connection, HttpServerExchange exchange) | |
| bufferDone | back to summary |
|---|---|
| private void bufferDone() | |
| flush | back to summary |
|---|---|
| public boolean flush() throws IOException Overrides org. Implements org. Doc from org. Flush out any unwritten, buffered output.
| |
| flushHeaderBuffer | back to summary |
|---|---|
| private boolean flushHeaderBuffer(ByteBuffer buffer, String string, HeaderValues headerValues, int charIndex, long fiCookie, int valueIdx) throws IOException | |
| freeBuffers | back to summary |
|---|---|
| pack-priv void freeBuffers() | |
| freeContinueResponse | back to summary |
|---|---|
| public void freeContinueResponse() | |
| getWorker | back to summary |
|---|---|
| public XnioWorker getWorker() Overrides org. Implements org. Doc from org. Get the XNIO worker associated with this conduit.
| |
| processStatefulWrite | back to summary |
|---|---|
| private int processStatefulWrite(int state, final Object userData, int pos, int len) throws IOException Handles writing out the header data in the case where is is too big to fit into a buffer. This is a much slower code path. | |
| processWrite | back to summary |
|---|---|
| private int processWrite(int state, final Object userData, int pos, int length) throws IOException Handles writing out the header data. It can also take a byte buffer of user data, to enable both user data and headers to be written out in a single operation, which has a noticeable performance impact. It is up to the caller to note the current position of this buffer before and after they call this method, and use this to figure out how many bytes (if any) have been written. | |
| reset | back to summary |
|---|---|
| pack-priv void reset(HttpServerExchange exchange) | |
| terminateWrites | back to summary |
|---|---|
| public void terminateWrites() throws IOException Overrides org. Implements org. Doc from org. Signal that no more write data is forthcoming. The conduit must be | |
| transferFrom | back to summary |
|---|---|
| public long transferFrom(final FileChannel src, final long position, final long count) throws IOException Overrides org. Implements org. Doc from org. Transfer bytes into this conduit from the given file.
| |
| transferFrom | back to summary |
|---|---|
| public long transferFrom(final StreamSourceChannel source, final long count, final ByteBuffer throughBuffer) throws IOException Overrides org. Implements org. Doc from org. Transfers bytes from the given channel source. On entry,
| |
| truncateWrites | back to summary |
|---|---|
| public void truncateWrites() throws IOException Overrides org. Implements org. Doc from org. Terminate writes and discard any outstanding write data. The conduit is terminated and flushed regardless of the outcome of this method.
| |
| write | back to summary |
|---|---|
| public int write(final ByteBuffer src) throws IOException Overrides org. Implements org. Doc from org. Writes a sequence of bytes to this conduit from the given buffer.
| |
| write | back to summary |
|---|---|
| public long write(final ByteBuffer[] srcs) throws IOException | |
| write | back to summary |
|---|---|
| public long write(final ByteBuffer[] srcs, final int offset, final int length) throws IOException Overrides org. Implements org. Doc from org. Writes a sequence of bytes to this conduit from the given buffers.
| |
| writeFinal | back to summary |
|---|---|
| public int writeFinal(ByteBuffer src) throws IOException Overrides org. Implements org. Doc from org. Writes some data to the conduit, with the same semantics as
| |
| writeFinal | back to summary |
|---|---|
| public long writeFinal(ByteBuffer[] srcs, int offset, int length) throws IOException Overrides org. Implements org. Doc from org. Writes some data to the conduit, with the same semantics as
| |
| writeString | back to summary |
|---|---|
| private static void writeString(ByteBuffer buffer, String string) | |