| Package | Description |
|---|---|
| com.linecorp.armeria.client |
Client core.
|
| com.linecorp.armeria.client.encoding |
HTTP content decoding client.
|
| com.linecorp.armeria.common |
Common types.
|
| com.linecorp.armeria.common.logging | |
| com.linecorp.armeria.internal.common |
Various classes used internally.
|
| com.linecorp.armeria.internal.server |
Various classes used internally.
|
| com.linecorp.armeria.server.file |
HTTP static file service.
|
| com.linecorp.armeria.unsafe |
Utilities for working with
ByteBuf in an unsafe way. |
| Modifier and Type | Method and Description |
|---|---|
default HttpResponse |
WebClient.execute(RequestHeaders headers,
HttpData content)
Sends an HTTP request with the specified headers and content.
|
default HttpResponse |
WebClient.patch(String path,
HttpData content)
Sends an HTTP PATCH request with the specified content.
|
default HttpResponse |
WebClient.post(String path,
HttpData content)
Sends an HTTP POST request with the specified content.
|
default HttpResponse |
WebClient.put(String path,
HttpData content)
Sends an HTTP PUT request with the specified content.
|
| Modifier and Type | Method and Description |
|---|---|
HttpData |
StreamDecoder.decode(HttpData obj)
|
HttpData |
StreamDecoder.finish()
Closes the decoder and returns any decoded data that may be left over.
|
| Modifier and Type | Method and Description |
|---|---|
HttpData |
StreamDecoder.decode(HttpData obj)
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractHttpData
Support APIs for creating well-behaved
HttpData objects. |
class |
DefaultHttpData
Deprecated.
Use the factory methods in
HttpData. |
| Modifier and Type | Field and Description |
|---|---|
static HttpData |
HttpData.EMPTY_DATA
Deprecated.
Use
empty(). |
| Modifier and Type | Method and Description |
|---|---|
static HttpData |
HttpData.copyOf(byte[] data)
Creates a new instance from the specified byte array by first copying it.
|
static HttpData |
HttpData.copyOf(byte[] data,
int offset,
int length)
Creates a new instance from the specified byte array,
offset and length by first copying
it. |
static HttpData |
HttpData.copyOf(io.netty.buffer.ByteBuf data)
Creates a new instance from the specified
ByteBuf by first copying it's content. |
static HttpData |
HttpData.empty()
Returns an empty
HttpData. |
static HttpData |
HttpData.of(byte[] data)
Deprecated.
Use
wrap(byte[]). |
static HttpData |
HttpData.of(byte[] data,
int offset,
int length)
Deprecated.
|
static HttpData |
HttpData.of(io.netty.buffer.ByteBuf buf)
Deprecated.
Use
copyOf(ByteBuf). |
static HttpData |
HttpData.of(Charset charset,
CharSequence text)
Converts the specified
text into an HttpData. |
static HttpData |
HttpData.of(Charset charset,
String text)
Converts the specified
text into an HttpData. |
static HttpData |
HttpData.of(Charset charset,
String format,
Object... args)
Converts the specified formatted string into an
HttpData. |
static HttpData |
HttpData.ofAscii(CharSequence text)
Converts the specified
text into a US-ASCII HttpData. |
static HttpData |
HttpData.ofAscii(String text)
Converts the specified
text into a US-ASCII HttpData. |
static HttpData |
HttpData.ofAscii(String format,
Object... args)
Converts the specified formatted string into a US-ASCII
HttpData. |
static HttpData |
HttpData.ofUtf8(CharSequence text)
Converts the specified
text into a UTF-8 HttpData. |
static HttpData |
HttpData.ofUtf8(String text)
Converts the specified
text into a UTF-8 HttpData. |
static HttpData |
HttpData.ofUtf8(String format,
Object... args)
Converts the specified formatted string into a UTF-8
HttpData. |
HttpData |
HttpStatus.toHttpData()
Returns the
HttpData whose content is "<code> <reasonPhrase>" encoded in UTF-8. |
HttpData |
HttpData.withEndOfStream()
Returns a new
HttpData whose HTTP/2 endOfStream flag is set. |
static HttpData |
HttpData.wrap(byte[] data)
Creates a new instance from the specified byte array.
|
static HttpData |
HttpData.wrap(byte[] data,
int offset,
int length)
Creates a new instance from the specified byte array,
offset and length. |
static HttpData |
HttpData.wrap(io.netty.buffer.ByteBuf buf)
Converts the specified Netty
ByteBuf into an HttpData. |
| Modifier and Type | Method and Description |
|---|---|
static HttpRequest |
HttpRequest.of(HttpMethod method,
String path,
MediaType mediaType,
HttpData content)
Creates a new HTTP request and closes the stream.
|
static AggregatedHttpRequest |
AggregatedHttpRequest.of(HttpMethod method,
String path,
MediaType mediaType,
HttpData content)
Creates a new HTTP request.
|
static HttpRequest |
HttpRequest.of(HttpMethod method,
String path,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP request and closes the stream.
|
static AggregatedHttpRequest |
AggregatedHttpRequest.of(HttpMethod method,
String path,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP request.
|
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content)
Creates a new HTTP response of the specified
HttpStatus. |
static HttpResponse |
HttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(HttpStatus status,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response of the specified
HttpStatus. |
static AggregatedHttpResponse |
AggregatedHttpResponse.of(Iterable<ResponseHeaders> informationals,
ResponseHeaders headers,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response.
|
static HttpRequest |
HttpRequest.of(RequestHeaders headers,
HttpData... contents)
Creates a new
HttpRequest that publishes the given HttpObjects and closes the stream. |
static HttpRequest |
HttpRequest.of(RequestHeaders headers,
HttpData content)
Creates a new
HttpRequest and closes the stream. |
static AggregatedHttpRequest |
AggregatedHttpRequest.of(RequestHeaders headers,
HttpData content)
Creates a new HTTP request.
|
static HttpRequest |
HttpRequest.of(RequestHeaders headers,
HttpData content,
HttpHeaders trailers)
Creates a new
HttpRequest and closes the stream. |
static AggregatedHttpRequest |
AggregatedHttpRequest.of(RequestHeaders headers,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP request.
|
static HttpResponse |
HttpResponse.of(ResponseHeaders headers,
HttpData content)
Creates a new HTTP response of the specified headers and content.
|
static AggregatedHttpResponse |
AggregatedHttpResponse.of(ResponseHeaders headers,
HttpData content)
Creates a new HTTP response.
|
static HttpResponse |
HttpResponse.of(ResponseHeaders headers,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response of the specified objects.
|
static AggregatedHttpResponse |
AggregatedHttpResponse.of(ResponseHeaders headers,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response.
|
default void |
HttpResponseWriter.respond(HttpStatus status,
MediaType mediaType,
HttpData content)
Deprecated.
|
default void |
HttpResponseWriter.respond(HttpStatus status,
MediaType mediaType,
HttpData content,
HttpHeaders trailers)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
RequestLogBuilder.increaseRequestLength(HttpData data)
|
void |
RequestLogBuilder.increaseResponseLength(HttpData data)
|
void |
ContentPreviewer.onData(HttpData data)
Invoked after request/response data is received.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract io.netty.channel.ChannelFuture |
HttpObjectEncoder.doWriteData(int id,
int streamId,
HttpData data,
boolean endStream) |
protected io.netty.channel.ChannelFuture |
Http2ObjectEncoder.doWriteData(int id,
int streamId,
HttpData data,
boolean endStream) |
protected io.netty.channel.ChannelFuture |
Http1ObjectEncoder.doWriteData(int id,
int streamId,
HttpData data,
boolean endStream) |
static boolean |
ArmeriaHttpUtil.isContentAlwaysEmptyWithValidation(HttpStatus status,
HttpData content,
HttpHeaders trailers)
Returns
true if the content of the response with the given HttpStatus is expected to
be always empty (1xx, 204, 205 and 304 responses.) |
static ResponseHeaders |
ArmeriaHttpUtil.setOrRemoveContentLength(ResponseHeaders headers,
HttpData content,
HttpHeaders trailers)
Returns a
ResponseHeaders whose HttpHeaderNames.CONTENT_LENGTH is added or removed
according to the status of the specified headers, content and trailers. |
protected io.netty.buffer.ByteBuf |
HttpObjectEncoder.toByteBuf(HttpData data) |
io.netty.channel.ChannelFuture |
HttpObjectEncoder.writeData(int id,
int streamId,
HttpData data,
boolean endStream)
Writes an
HttpData. |
| Modifier and Type | Method and Description |
|---|---|
static HttpResponseWriter |
ResponseConversionUtil.aggregateFrom(org.reactivestreams.Publisher<?> publisher,
ResponseHeaders headers,
HttpHeaders trailers,
Function<Object,HttpData> contentConverter)
Returns a new
HttpResponseWriter which has a content converted from the collected objects. |
static HttpResponseWriter |
ResponseConversionUtil.aggregateFrom(Stream<?> stream,
ResponseHeaders headers,
HttpHeaders trailers,
Function<Object,HttpData> contentConverter,
Executor executor)
Returns a new
HttpResponseWriter which has a content converted from the collected objects. |
static <T> HttpResponseWriter |
ResponseConversionUtil.streamingFrom(org.reactivestreams.Publisher<T> publisher,
ResponseHeaders headers,
HttpHeaders trailers,
Function<T,HttpData> contentConverter)
Returns a new
HttpResponseWriter which sends a streaming response from the specified
Publisher. |
static <T> HttpResponseWriter |
ResponseConversionUtil.streamingFrom(Stream<T> stream,
ResponseHeaders headers,
HttpHeaders trailers,
Function<T,HttpData> contentConverter,
Executor executor)
Returns a new
HttpResponseWriter which sends a streaming response from the specified
Stream. |
| Modifier and Type | Method and Description |
|---|---|
HttpData |
AggregatedHttpFile.content()
Returns the content of the file.
|
| Modifier and Type | Method and Description |
|---|---|
static HttpFileBuilder |
HttpFile.builder(HttpData data)
|
static HttpFileBuilder |
HttpFile.builder(HttpData data,
long lastModifiedMillis)
Returns a new
HttpFileBuilder that builds an AggregatedHttpFile from the specified
HttpData and lastModifiedMillis. |
static HttpFileBuilder |
HttpFileBuilder.of(HttpData data)
Deprecated.
|
static AggregatedHttpFile |
HttpFile.of(HttpData data)
Creates a new
AggregatedHttpFile which streams the specified HttpData. |
static HttpFileBuilder |
HttpFileBuilder.of(HttpData data,
long lastModifiedMillis)
Deprecated.
|
static AggregatedHttpFile |
HttpFile.of(HttpData data,
long lastModifiedMillis)
Creates a new
AggregatedHttpFile which streams the specified HttpData with the specified
lastModifiedMillis. |
| Modifier and Type | Class and Description |
|---|---|
class |
ByteBufHttpData
An
HttpData that is backed by a ByteBuf for optimizing certain internal use cases. |
Copyright © 2020 LeanCloud. All rights reserved.