public interface Sender
Modifier and Type | Method and Description |
---|---|
void | close() Closes this sender asynchronously |
void | close(IoCallback callback) Closes this sender asynchronously. |
void | send(ByteBuffer buffer) Write the given buffer using async IO, and ends the exchange when done |
void | send(ByteBuffer[] buffer) Write the given buffers using async IO, and ends the exchange when done |
void | send(ByteBuffer[] buffer, IoCallback callback) Write the given buffers using async IO, and calls the given callback on completion or error. |
void | send(ByteBuffer buffer, IoCallback callback) Write the given buffer using async IO, and calls the given callback on completion or error. |
void | send(String data) Write the given String using async IO, and ends the exchange when done |
void | send(String data, Charset charset) Write the given String using async IO, and ends the exchange when done |
void | send(String data, Charset charset, IoCallback callback) Write the given String using async IO, and calls the given callback on completion or error. |
void | send(String data, IoCallback callback) Write the given String using async IO, and calls the given callback on completion or error. |
void | transferFrom(FileChannel channel, IoCallback callback) Transfers all content from the specified file |
void send(ByteBuffer buffer, IoCallback callback)
buffer
- The buffer to send.callback
- The callbackvoid send(ByteBuffer[] buffer, IoCallback callback)
buffer
- The buffers to send.callback
- The callbackvoid send(ByteBuffer buffer)
buffer
- The buffer to send.void send(ByteBuffer[] buffer)
buffer
- The buffers to send.void send(String data, IoCallback callback)
The CharSequence is encoded to UTF8
data
- The data to sendcallback
- The callbackvoid send(String data, Charset charset, IoCallback callback)
data
- The buffer to end.charset
- The charset to usecallback
- The callbackvoid send(String data)
The CharSequence is encoded to UTF8
data
- The data to sendvoid send(String data, Charset charset)
data
- The buffer to end.charset
- The charset to usevoid transferFrom(FileChannel channel, IoCallback callback)
channel
- the file channel to transfercallback
- The callbackvoid close(IoCallback callback)
callback
- The callback that is notified when all data has been flushed and the channel is closedvoid close()
Copyright © 2017 JBoss by Red Hat. All rights reserved.