| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | OutputBuffer.
The |
| private static class | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private OutputBuffer. | |
| private int | |
| private HttpContent. | |
| private char[] | |
| private int | |
| private CharBuffer | |
| private final OutputBuffer. | |
| private boolean | |
| private boolean | |
| private CompositeBuffer | |
| private Connection | |
| private FilterChainContext | |
| private Buffer | |
| private static final int | |
| private CharsetEncoder | |
| private final Map | |
| private boolean | |
| private boolean | |
| private volatile WriteHandler | |
| private boolean | |
| private HttpContext | |
| private static final boolean | IS_BLOCKING
Flag indicating whether or not async operations are being used on the input streams. |
| private boolean | |
| private boolean | |
| private final List | |
| protected static final Logger | |
| private static final int | |
| private MemoryManager | |
| private static final int | |
| private HttpHeader | |
| protected boolean | |
| private final TemporaryHeapBuffer | |
| private Supplier | |
| private Runnable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public boolean | |
| public boolean | |
| public boolean | |
| private boolean | |
| private void | |
| private void | |
| private void | |
| public void | |
| private boolean | |
| public void | |
| private void | |
| public void | |
| private boolean | |
| private boolean | |
| private void | |
| private void | flushBuffer(final Buffer bufferToFlush, final boolean isLast, final MessageCloner<Buffer> messageCloner)
|
| private void | |
| private void | |
| private void | |
| public int | Returns: the number of bytes buffered on OutputBuffer and ready to be sent.Get the number of bytes buffered on OutputBuffer and ready to be sent. |
| public int | |
| private CharsetEncoder | |
| protected Executor | |
| public Supplier | |
| public void | initialize(final HttpHeader outputHeader, final boolean sendfileEnabled, final FilterChainContext ctx)
|
| public boolean | Returns: true if content will be written in a non-blocking fashion, otherwise returns false.
Deprecated
will always return true
Returns |
| public boolean | |
| public void | notifyCanWrite(final WriteHandler handler, final int length)
Deprecated
the
length parameter will be ignored.
|
| public void | |
| private void | |
| private void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public boolean | |
| public void | |
| public void | sendfile(final File
the file, final CompletionHandler<WriteResult<K, L>> File to transfer.CompletionHandler that will be notified of the transfer progress/completion or failure.
Calls |
| public void | sendfile(final File
the file, final long File to transfer.the starting offset within the File offset, final long the total number of bytes to transfer length, final CompletionHandler<WriteResult<K, L>> CompletionHandler that will be notified of the transfer progress/completion or failure.
Will use |
| public void | setAsyncEnabled(boolean
true if this OutputBuffer
Deprecated
Sets the asynchronous processing state of this |
| public void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | writeBuffer(final Buffer
the buffer)Buffer to write
Writes the contents of the specified |
| public void | |
| public void | writeByteBuffer(final ByteBuffer
the byteBuffer)ByteBuffer to write
Writes the contents of the specified |
| public void | |
| public void | writeInterimResponse()
Flush a pending informational (1xx) interim response — either a 100-Continue acknowledgement of an
|
| private boolean | |
| private boolean |
| asyncWriteHandler | back to summary |
|---|---|
| private OutputBuffer. | |
| bufferSize | back to summary |
|---|---|
| private int bufferSize | |
| builder | back to summary |
|---|---|
| private HttpContent. | |
| charsArray | back to summary |
|---|---|
| private char[] charsArray | |
| charsArrayLength | back to summary |
|---|---|
| private int charsArrayLength | |
| charsBuffer | back to summary |
|---|---|
| private CharBuffer charsBuffer | |
| cloner | back to summary |
|---|---|
| private final OutputBuffer. | |
| closed | back to summary |
|---|---|
| private boolean closed | |
| committed | back to summary |
|---|---|
| private boolean committed | |
| compositeBuffer | back to summary |
|---|---|
| private CompositeBuffer compositeBuffer | |
| connection | back to summary |
|---|---|
| private Connection<L> connection | |
| ctx | back to summary |
|---|---|
| private FilterChainContext ctx | |
| currentBuffer | back to summary |
|---|---|
| private Buffer currentBuffer | |
| DEFAULT_BUFFER_SIZE | back to summary |
|---|---|
| private static final int DEFAULT_BUFFER_SIZE | |
| encoder | back to summary |
|---|---|
| private CharsetEncoder encoder | |
| encoders | back to summary |
|---|---|
| private final Map<String, CharsetEncoder> encoders | |
| fileTransferRequested | back to summary |
|---|---|
| private boolean fileTransferRequested | |
| finished | back to summary |
|---|---|
| private boolean finished | |
| handler | back to summary |
|---|---|
| private volatile WriteHandler handler | |
| headersWritten | back to summary |
|---|---|
| private boolean headersWritten | |
| httpContext | back to summary |
|---|---|
| private HttpContext httpContext | |
| IS_BLOCKING | back to summary |
|---|---|
| private static final boolean IS_BLOCKING Flag indicating whether or not async operations are being used on the input streams. | |
| isLastWriteNonBlocking | back to summary |
|---|---|
| private boolean isLastWriteNonBlocking | |
| isNonBlockingWriteGuaranteed | back to summary |
|---|---|
| private boolean isNonBlockingWriteGuaranteed | |
| lifeCycleListeners | back to summary |
|---|---|
| private final List<OutputBuffer. | |
| LOGGER | back to summary |
|---|---|
| protected static final Logger LOGGER | |
| MAX_CHAR_BUFFER_SIZE | back to summary |
|---|---|
| private static final int MAX_CHAR_BUFFER_SIZE | |
| memoryManager | back to summary |
|---|---|
| private MemoryManager<E extends Buffer> memoryManager | |
| MIN_BUFFER_SIZE | back to summary |
|---|---|
| private static final int MIN_BUFFER_SIZE | |
| outputHeader | back to summary |
|---|---|
| private HttpHeader outputHeader | |
| sendfileEnabled | back to summary |
|---|---|
| protected boolean sendfileEnabled | |
| temporaryWriteBuffer | back to summary |
|---|---|
| private final TemporaryHeapBuffer temporaryWriteBuffer | |
| trailersSupplier | back to summary |
|---|---|
| private Supplier<Map<String, String>> trailersSupplier | |
| writePossibleRunnable | back to summary |
|---|---|
| private Runnable writePossibleRunnable | |
| OutputBuffer | back to summary |
|---|---|
| public OutputBuffer() | |
| blockAfterWriteIfNeeded | back to summary |
|---|---|
| protected void blockAfterWriteIfNeeded() throws IOException | |
| canWrite | back to summary |
|---|---|
| public boolean canWrite(final int length)
Deprecated the
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite() | |
| canWriteChar | back to summary |
|---|---|
| public boolean canWriteChar(final int length)
Deprecated
| |
| canWritePayloadChunk | back to summary |
|---|---|
| private boolean canWritePayloadChunk() | |
| checkCharBuffer | back to summary |
|---|---|
| private void checkCharBuffer() | |
| checkCompositeBuffer | back to summary |
|---|---|
| private void checkCompositeBuffer() | |
| checkCurrentBuffer | back to summary |
|---|---|
| private void checkCurrentBuffer() | |
| close | back to summary |
|---|---|
| public void close() throws IOException | |
| doCommit | back to summary |
|---|---|
| private boolean doCommit() throws IOException | |
| endRequest | back to summary |
|---|---|
| public void endRequest() throws IOException | |
| finishCurrentBuffer | back to summary |
|---|---|
| private void finishCurrentBuffer() | |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Flush the response.
| |
| flushAllBuffers | back to summary |
|---|---|
| private boolean flushAllBuffers(final boolean isLast) throws IOException | |
| flushBinaryBuffers | back to summary |
|---|---|
| private boolean flushBinaryBuffers(final boolean isLast) throws IOException | |
| flushBinaryBuffersIfNeeded | back to summary |
|---|---|
| private void flushBinaryBuffersIfNeeded() throws IOException | |
| flushBuffer | back to summary |
|---|---|
| private void flushBuffer(final Buffer bufferToFlush, final boolean isLast, final MessageCloner<Buffer> messageCloner) throws IOException | |
| flushCharsToBuf | back to summary |
|---|---|
| private void flushCharsToBuf(final boolean canFlushToNet) throws IOException | |
| flushCharsToBuf | back to summary |
|---|---|
| private void flushCharsToBuf(final CharBuffer charBuf, final boolean canFlushToNet) throws IOException | |
| forceCommitHeaders | back to summary |
|---|---|
| private void forceCommitHeaders(final boolean isLast) throws IOException | |
| getBufferedDataSize | back to summary |
|---|---|
| public int getBufferedDataSize() Get the number of bytes buffered on OutputBuffer and ready to be sent.
| |
| getBufferSize | back to summary |
|---|---|
| public int getBufferSize() | |
| getEncoder | back to summary |
|---|---|
| private CharsetEncoder getEncoder() | |
| getThreadPool | back to summary |
|---|---|
protected Executor getThreadPool()
| |
| getTrailers | back to summary |
|---|---|
| public Supplier | |
| initialize | back to summary |
|---|---|
| public void initialize(final HttpHeader outputHeader, final boolean sendfileEnabled, final FilterChainContext ctx) | |
| isAsyncEnabled | back to summary |
|---|---|
| public boolean isAsyncEnabled()
Deprecated will always return true
Returns
| |
| isClosed | back to summary |
|---|---|
public boolean isClosed()
| |
| notifyCanWrite | back to summary |
|---|---|
| public void notifyCanWrite(final WriteHandler handler, final int length)
Deprecated the
| |
| notifyCanWrite | back to summary |
|---|---|
| public void notifyCanWrite(final WriteHandler handler) | |
| notifyCommit | back to summary |
|---|---|
| private void notifyCommit() throws IOException | |
| notifyWritePossible | back to summary |
|---|---|
| private void notifyWritePossible() Notify WriteHandler | |
| notifyWritePossibleAsync | back to summary |
|---|---|
| private void notifyWritePossibleAsync() Notify WriteHandler asynchronously | |
| prepareCharacterEncoder | back to summary |
|---|---|
| public void prepareCharacterEncoder() | |
| recycle | back to summary |
|---|---|
| public void recycle() Recycle the output buffer. This should be called when closing the connection. | |
| registerLifeCycleListener | back to summary |
|---|---|
public void registerLifeCycleListener(final OutputBuffer.
| |
| removeLifeCycleListener | back to summary |
|---|---|
public boolean removeLifeCycleListener(final OutputBuffer.
| |
| reset | back to summary |
|---|---|
| public void reset() Reset current response.
| |
| sendfile | back to summary |
|---|---|
| public void sendfile(final File file, final CompletionHandler<WriteResult<K, L>> handler)
Calls
| |
| sendfile | back to summary |
|---|---|
| public void sendfile(final File file, final long offset, final long length, final CompletionHandler<WriteResult<K, L>> handler)
Will use It's required that the response be suspended when using this functionality. It will be assumed that if the response wasn't suspended when this method is called, that it's desired that this method manages the suspend/resume cycle.
| |
| setAsyncEnabled | back to summary |
|---|---|
| public void setAsyncEnabled(boolean asyncEnabled)
Deprecated
Sets the asynchronous processing state of this
| |
| setBufferSize | back to summary |
|---|---|
| public void setBufferSize(final int bufferSize) | |
| setTrailers | back to summary |
|---|---|
| public void setTrailers(Supplier<Map<String, String>> trailersSupplier) | |
| updateNonBlockingStatus | back to summary |
|---|---|
| private void updateNonBlockingStatus() | |
| write | back to summary |
|---|---|
| public void write(char[] cbuf, int off, int len) throws IOException | |
| write | back to summary |
|---|---|
| public void write(final char[] cbuf) throws IOException | |
| write | back to summary |
|---|---|
| public void write(final String str) throws IOException | |
| write | back to summary |
|---|---|
| public void write(final String str, final int off, final int len) throws IOException | |
| write | back to summary |
|---|---|
| public void write(final byte[] b) throws IOException | |
| write | back to summary |
|---|---|
| public void write(final byte[] b, final int off, final int len) throws IOException | |
| writeBuffer | back to summary |
|---|---|
| public void writeBuffer(final Buffer buffer) throws IOException
Writes the contents of the specified Buffer will be directly used by underlying connection, so it could be reused only if it has
been flushed.
| |
| writeByte | back to summary |
|---|---|
| public void writeByte(final int b) throws IOException | |
| writeByteBuffer | back to summary |
|---|---|
| public void writeByteBuffer(final ByteBuffer byteBuffer) throws IOException
Writes the contents of the specified ByteBuffer will be directly used by underlying connection, so it could be reused only if it
has been flushed.
| |
| writeChar | back to summary |
|---|---|
| public void writeChar(int c) throws IOException | |
| writeInterimResponse | back to summary |
|---|---|
| public void writeInterimResponse() throws IOException Flush a pending informational (1xx) interim response — either a 100-Continue acknowledgement of an
| |
| writingBytes | back to summary |
|---|---|
| private boolean writingBytes() | |
| writingChars | back to summary |
|---|---|
| private boolean writingChars() | |
MessageCloner, responsible for cloning Buffer content, if it wasn't possible to write it in the current
Thread (it was added to async write queue). We do this, because write(byte[], int, int) method is not aware
of async write queues, and content of the passed byte[] might be changed by user application once in gets control
back.
| Modifier and Type | Field and Description |
|---|---|
| private final TemporaryHeapBuffer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Buffer | clone(final Connection<L> connection, final Buffer originalMessage)
Implements org. Method will be called by |
| pack-priv Buffer |
| temporaryWriteBuffer | back to summary |
|---|---|
| private final TemporaryHeapBuffer temporaryWriteBuffer | |
| ByteArrayCloner | back to summary |
|---|---|
| public ByteArrayCloner(final TemporaryHeapBuffer temporaryWriteBuffer) | |
| clone | back to summary |
|---|---|
| public Buffer clone(final Connection<L> connection, final Buffer originalMessage) Implements org. Doc from org. Method will be called by
| |
| clone0 | back to summary |
|---|---|
| pack-priv Buffer clone0(final MemoryManager<E extends Buffer> memoryManager, final Buffer originalMessage) | |
| Modifier and Type | Field and Description |
|---|---|
| private volatile OutputBuffer |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public void | onError(final Throwable t)
Implements org. Invoked when an error occurs processing the request asynchronously. |
| private static void | |
| public void | onWritePossible()
Implements org. This callback will be invoked when the requirements as dictated by writer are met. |
| private static void |
| outputBuffer | back to summary |
|---|---|
| private volatile OutputBuffer outputBuffer | |
| InternalWriteHandler | back to summary |
|---|---|
| public InternalWriteHandler(final OutputBuffer outputBuffer) | |
| detach | back to summary |
|---|---|
| public void detach() | |
| onError | back to summary |
|---|---|
| public void onError(final Throwable t) Implements org. Doc from org. Invoked when an error occurs processing the request asynchronously.
| |
| onError0 | back to summary |
|---|---|
| private static void onError0(final OutputBuffer ob, final Throwable t) | |
| onWritePossible | back to summary |
|---|---|
| public void onWritePossible() throws Exception Implements org. Doc from org. This callback will be invoked when the requirements as dictated by writer are met.
| |
| onWritePossible0 | back to summary |
|---|---|
| private static void onWritePossible0(final OutputBuffer ob) throws Exception | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| onCommit | back to summary |
|---|---|
| public void onCommit() throws IOException | |