Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE
TODO: we should be used pooled buffers
|
Constructor and Description |
---|
BlockingSenderImpl(HttpServerExchange exchange,
OutputStream outputStream) |
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
The CharSequence is encoded to UTF8
|
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 static final int BUFFER_SIZE
public BlockingSenderImpl(HttpServerExchange exchange, OutputStream outputStream)
public void send(ByteBuffer buffer, IoCallback callback)
Sender
public void send(ByteBuffer[] buffer, IoCallback callback)
Sender
public void send(ByteBuffer buffer)
Sender
public void send(ByteBuffer[] buffer)
Sender
public void send(String data, IoCallback callback)
Sender
public void send(String data, Charset charset, IoCallback callback)
Sender
public void send(String data)
Sender
public void send(String data, Charset charset)
Sender
public void transferFrom(FileChannel source, IoCallback callback)
Sender
transferFrom
in interface Sender
source
- the file channel to transfercallback
- The callbackpublic void close(IoCallback callback)
Sender
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.