public interface NativeResponse
NativeResponse
.Modifier and Type | Method and Description |
---|---|
boolean |
committed() |
void |
end()
End a response and clean up any resources used it.
|
Optional<String> |
header(String name)
Get a response header (previously set).
|
void |
header(String name,
Iterable<String> values)
Set a response header.
|
void |
header(String name,
String value)
Set a response header.
|
List<String> |
headers(String name)
Get all the response headers for the provided name.
|
void |
reset()
Reset the HTTP status, headers and response buffer is need it.
|
void |
send(byte[] bytes) |
void |
send(ByteBuffer buffer) |
void |
send(FileChannel channel) |
void |
send(FileChannel channel,
long possition,
long count) |
void |
send(InputStream stream) |
int |
statusCode() |
void |
statusCode(int code)
Set the HTTP response status.
|
Optional<String> header(String name)
name
- Header's name.List<String> headers(String name)
name
- A header's namevoid header(String name, Iterable<String> values)
name
- Header's name.values
- Header's values.void header(String name, String value)
name
- Header's name.value
- Header's value.void send(ByteBuffer buffer) throws Exception
Exception
void send(InputStream stream) throws Exception
Exception
void send(FileChannel channel) throws Exception
Exception
void send(FileChannel channel, long possition, long count) throws Exception
Exception
int statusCode()
void statusCode(int code)
code
- A HTTP response status.boolean committed()
void end()
void reset()
Copyright © 2017. All rights reserved.