Modifier and Type | Class and Description |
---|---|
class |
AsyncSenderImpl.TransferTask |
Constructor and Description |
---|
AsyncSenderImpl(HttpServerExchange exchange) |
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 source,
IoCallback callback)
Transfers all content from the specified file
|
public AsyncSenderImpl(HttpServerExchange exchange)
public void send(ByteBuffer buffer, IoCallback callback)
Sender
public void send(ByteBuffer[] buffer, IoCallback callback)
Sender
public void transferFrom(FileChannel source, IoCallback callback)
Sender
transferFrom
in interface Sender
source
- the file channel to transfercallback
- The callbackpublic void send(ByteBuffer buffer)
Sender
public void send(ByteBuffer[] buffer)
Sender
public void send(String data, IoCallback callback)
Sender
The CharSequence is encoded to UTF8
public void send(String data, Charset charset, IoCallback callback)
Sender
public void send(String data)
Sender
The CharSequence is encoded to UTF8
public void send(String data, Charset charset)
Sender
public void close(IoCallback callback)
Sender
Copyright © 2020 JBoss by Red Hat. All rights reserved.