| Modifier and Type | Field and Description |
|---|---|
| public static final int | BUFFER_SIZE
Todo we should be used pooled buffers |
| private final CharsetDecoder | |
| private final HttpServerExchange | |
| private volatile Thread | |
| private String | |
| private FileChannel | |
| private IoCallback | |
| private volatile Thread | |
| private final PrintWriter |
| Access | Constructor and Description |
|---|---|
| public | BlockingWriterSenderImpl(final HttpServerExchange exchange, final PrintWriter writer, final String charset)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | close(final IoCallback
The callback that is notified when all data has been flushed and the channel is closed callback)Implements io. Closes this sender asynchronously. |
| public void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| public void | send(final ByteBuffer
The buffer to send. buffer, final IoCallback The callback callback)Implements io. Write the given buffer using async IO, and calls the given callback on completion or error. |
| public void | send(final ByteBuffer[]
The buffers to send. buffer, final IoCallback The callback callback)Implements io. Write the given buffers using async IO, and calls the given callback on completion or error. |
| public void | send(final String
The data to send data, final IoCallback The callback callback)Implements io. Write the given String using async IO, and calls the given callback on completion or error. |
| public void | send(final ByteBuffer
The buffer to send. buffer)Implements io. Write the given buffer using async IO, and ends the exchange when done |
| public void | send(final ByteBuffer[]
The buffers to send. buffer)Implements io. Write the given buffers using async IO, and ends the exchange when done |
| public void | send(final String
The buffer to end. data, final Charset The charset to use charset, final IoCallback The callback callback)Implements io. Write the given String using async IO, and calls the given callback on completion or error. |
| public void | send(final String
The data to send data)Implements io. Write the given String using async IO, and ends the exchange when done The CharSequence is encoded to UTF8 |
| public void | send(final String
The buffer to end. data, final Charset The charset to use charset)Implements io. Write the given String using async IO, and ends the exchange when done |
| public void | transferFrom(FileChannel
the file channel to transfer source, IoCallback The callback callback)Implements io. Transfers all content from the specified file |
| private boolean |
| BUFFER_SIZE | back to summary |
|---|---|
| public static final int BUFFER_SIZE Todo we should be used pooled buffers | |
| charsetDecoder | back to summary |
|---|---|
| private final CharsetDecoder charsetDecoder | |
| exchange | back to summary |
|---|---|
| private final HttpServerExchange exchange | |
| inCall | back to summary |
|---|---|
| private volatile Thread inCall | |
| next | back to summary |
|---|---|
| private String next | |
| pendingFile | back to summary |
|---|---|
| private FileChannel pendingFile | |
| queuedCallback | back to summary |
|---|---|
| private IoCallback queuedCallback | |
| sendThread | back to summary |
|---|---|
| private volatile Thread sendThread | |
| writer | back to summary |
|---|---|
| private final PrintWriter writer | |
| BlockingWriterSenderImpl | back to summary |
|---|---|
| public BlockingWriterSenderImpl(final HttpServerExchange exchange, final PrintWriter writer, final String charset) | |
| close | back to summary |
|---|---|
| public void close(final IoCallback callback) Implements io. Doc from io. Closes this sender asynchronously. The given callback is notified on completion
| |
| close | back to summary |
|---|---|
| public void close() Implements io. Doc from io. Closes this sender asynchronously
| |
| invokeOnComplete | back to summary |
|---|---|
| private void invokeOnComplete(final IoCallback callback) | |
| performTransfer | back to summary |
|---|---|
| private void performTransfer(FileChannel source, IoCallback callback) | |
| queue | back to summary |
|---|---|
| private void queue(final ByteBuffer[] byteBuffers, final IoCallback ioCallback) | |
| queue | back to summary |
|---|---|
| private void queue(final String data, final IoCallback callback) | |
| queue | back to summary |
|---|---|
| private void queue(final FileChannel data, final IoCallback callback) | |
| send | back to summary |
|---|---|
| public void send(final ByteBuffer buffer, final IoCallback callback) Implements io. Doc from io. Write the given buffer using async IO, and calls the given callback on completion or error.
| |
| send | back to summary |
|---|---|
| public void send(final ByteBuffer[] buffer, final IoCallback callback) Implements io. Doc from io. Write the given buffers using async IO, and calls the given callback on completion or error.
| |
| send | back to summary |
|---|---|
| public void send(final String data, final IoCallback callback) Implements io. Doc from io. Write the given String using async IO, and calls the given callback on completion or error. The CharSequence is encoded to UTF8
| |
| send | back to summary |
|---|---|
| public void send(final ByteBuffer buffer) Implements io. Doc from io. Write the given buffer using async IO, and ends the exchange when done
| |
| send | back to summary |
|---|---|
| public void send(final ByteBuffer[] buffer) Implements io. Doc from io. Write the given buffers using async IO, and ends the exchange when done
| |
| send | back to summary |
|---|---|
| public void send(final String data, final Charset charset, final IoCallback callback) Implements io. Doc from io. Write the given String using async IO, and calls the given callback on completion or error.
| |
| send | back to summary |
|---|---|
| public void send(final String data) Implements io. Doc from io. Write the given String using async IO, and ends the exchange when done The CharSequence is encoded to UTF8 | |
| send | back to summary |
|---|---|
| public void send(final String data, final Charset charset) Implements io. Doc from io. Write the given String using async IO, and ends the exchange when done | |
| transferFrom | back to summary |
|---|---|
| public void transferFrom(FileChannel source, IoCallback callback) Implements io. Doc from io. Transfers all content from the specified file
| |
| writeBuffer | back to summary |
|---|---|
| private boolean writeBuffer(final ByteBuffer buffer, final IoCallback callback) | |