| Package | Description |
|---|---|
| com.linecorp.armeria.client |
Client core.
|
| com.linecorp.armeria.common |
Common types.
|
| com.linecorp.armeria.common.logging | |
| com.linecorp.armeria.internal.common |
Various classes used internally.
|
| com.linecorp.armeria.internal.common.logging |
Various classes used internally.
|
| com.linecorp.armeria.internal.server |
Various classes used internally.
|
| com.linecorp.armeria.server.annotation |
Annotations for building a RESTful service.
|
| com.linecorp.armeria.server.file |
HTTP static file service.
|
| com.linecorp.armeria.server.streaming |
Supports streaming responses from
Publisher or Stream. |
| Modifier and Type | Method and Description |
|---|---|
ResponseHeaders |
InvalidResponseHeadersException.headers()
Returns the
ResponseHeaders which triggered this exception. |
| Constructor and Description |
|---|
InvalidResponseHeadersException(ResponseHeaders headers)
Creates a new instance with the specified
ResponseHeaders. |
InvalidResponseHeadersException(ResponseHeaders headers,
Throwable cause)
Creates a new instance with the specified
ResponseHeaders and cause. |
| Modifier and Type | Method and Description |
|---|---|
ResponseHeaders |
ResponseHeadersBuilder.build()
Returns a newly created
ResponseHeaders with the entries in this builder. |
ResponseHeaders |
AggregatedHttpResponse.headers()
Returns the
ResponseHeaders. |
static ResponseHeaders |
ResponseHeaders.of(HttpHeaders headers)
Returns a new
ResponseHeaders copied from the specified HttpHeaders. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status)
Returns a new
ResponseHeaders with the specified HttpStatus. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name,
Object value)
Returns a new
ResponseHeaders with the specified HttpStatus and an additional header. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
Object value1,
CharSequence name2,
Object value2)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
Object value1,
CharSequence name2,
Object value2,
CharSequence name3,
Object value3)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
Object value1,
CharSequence name2,
Object value2,
CharSequence name3,
Object value3,
CharSequence name4,
Object value4)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name,
String value)
Returns a new
ResponseHeaders with the specified HttpStatus and an additional header. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
String value1,
CharSequence name2,
String value2)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
String value1,
CharSequence name2,
String value2,
CharSequence name3,
String value3)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(HttpStatus status,
CharSequence name1,
String value1,
CharSequence name2,
String value2,
CharSequence name3,
String value3,
CharSequence name4,
String value4)
Returns a new
ResponseHeaders with the specified HttpStatus and additional headers. |
static ResponseHeaders |
ResponseHeaders.of(int statusCode)
Returns a new
ResponseHeaders with the specified statusCode. |
default ResponseHeaders |
ResponseHeaders.withMutations(Consumer<HttpHeadersBuilder> mutator) |
| Modifier and Type | Method and Description |
|---|---|
List<ResponseHeaders> |
AggregatedHttpResponse.informationals()
Returns the informational class (1xx) HTTP headers.
|
| Modifier and Type | Method and Description |
|---|---|
static AggregatedHttpResponse |
AggregatedHttpResponse.of(Iterable<ResponseHeaders> informationals,
ResponseHeaders headers,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response.
|
static HttpResponse |
HttpResponse.of(ResponseHeaders headers)
Creates a new HTTP response of the specified headers.
|
static AggregatedHttpResponse |
AggregatedHttpResponse.of(ResponseHeaders headers)
Creates a new HTTP response with empty content.
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
static AggregatedHttpResponse |
AggregatedHttpResponse.of(Iterable<ResponseHeaders> informationals,
ResponseHeaders headers,
HttpData content,
HttpHeaders trailers)
Creates a new HTTP response.
|
| Modifier and Type | Method and Description |
|---|---|
ResponseHeaders |
RequestLog.responseHeaders()
Returns the non-informational status
ResponseHeaders. |
| Modifier and Type | Method and Description |
|---|---|
ContentPreviewer |
ContentPreviewerFactory.responseContentPreviewer(RequestContext ctx,
ResponseHeaders resHeaders)
Returns a newly-created response
ContentPreviewer with the given RequestContext and
ResponseHeaders. |
void |
RequestLogBuilder.responseHeaders(ResponseHeaders responseHeaders)
Sets the
RequestLog.responseHeaders(). |
| Modifier and Type | Method and Description |
|---|---|
String |
RequestLog.toStringResponseOnly(Function<? super ResponseHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer,
Function<? super HttpHeaders,?> trailersSanitizer)
Returns the string representation of the
Response. |
| Modifier and Type | Method and Description |
|---|---|
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. |
static ResponseHeaders |
ArmeriaHttpUtil.toArmeria(io.netty.handler.codec.http.HttpResponse in)
Converts the headers of the given Netty HTTP/1.x response into Armeria HTTP/2 headers.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
| Modifier and Type | Method and Description |
|---|---|
static void |
LoggingDecorators.logResponse(org.slf4j.Logger logger,
RequestLog log,
Function<? super RequestLog,LogLevel> requestLogLevelMapper,
Function<? super RequestLog,LogLevel> responseLogLevelMapper,
Function<? super RequestHeaders,?> requestHeadersSanitizer,
Function<Object,?> requestContentSanitizer,
Function<? super HttpHeaders,?> requestTrailersSanitizer,
Function<? super ResponseHeaders,?> responseHeadersSanitizer,
Function<Object,?> responseContentSanitizer,
Function<? super HttpHeaders,?> responseTrailersSanitizer,
Function<? super Throwable,?> responseCauseSanitizer)
Logs a stringified response of
RequestLog. |
| 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 |
|---|---|
HttpResponse |
StringResponseConverterFunction.convertResponse(ServiceRequestContext ctx,
ResponseHeaders headers,
Object result,
HttpHeaders trailers) |
HttpResponse |
ServerSentEventResponseConverterFunction.convertResponse(ServiceRequestContext ctx,
ResponseHeaders headers,
Object result,
HttpHeaders trailers) |
HttpResponse |
ResponseConverterFunction.convertResponse(ServiceRequestContext ctx,
ResponseHeaders headers,
Object result,
HttpHeaders trailers)
Returns
HttpResponse instance corresponds to the given result. |
HttpResponse |
NullToNoContentResponseConverterFunction.convertResponse(ServiceRequestContext ctx,
ResponseHeaders headers,
Object result,
HttpHeaders trailers) |
HttpResponse |
JacksonResponseConverterFunction.convertResponse(ServiceRequestContext ctx,
ResponseHeaders headers,
Object result,
HttpHeaders trailers) |
HttpResponse |
ByteArrayResponseConverterFunction.convertResponse(ServiceRequestContext ctx,
ResponseHeaders headers,
Object result,
HttpHeaders trailers) |
| Modifier and Type | Method and Description |
|---|---|
ResponseHeaders |
HttpFile.readHeaders()
Reads the attributes of this file as
ResponseHeaders, which could be useful for building
a response for a HEAD request. |
ResponseHeaders |
AggregatedHttpFile.readHeaders()
Returns the attributes of this file as
ResponseHeaders, which could be useful for building
a response for a HEAD request. |
ResponseHeaders |
AbstractHttpFile.readHeaders() |
| Modifier and Type | Method and Description |
|---|---|
protected HttpResponse |
StreamingHttpFile.doRead(ResponseHeaders headers,
long length,
Executor fileReadExecutor,
io.netty.buffer.ByteBufAllocator alloc) |
protected abstract HttpResponse |
AbstractHttpFile.doRead(ResponseHeaders headers,
long length,
Executor fileReadExecutor,
io.netty.buffer.ByteBufAllocator alloc)
Returns a new
HttpResponse which streams the content of the file which follows the specified
ResponseHeaders. |
| Modifier and Type | Method and Description |
|---|---|
static HttpResponse |
ServerSentEvents.fromEvent(ResponseHeaders headers,
ServerSentEvent sse)
Creates a new Server-Sent Events stream of the specified
content. |
static HttpResponse |
ServerSentEvents.fromEvent(ResponseHeaders headers,
ServerSentEvent sse,
HttpHeaders trailers)
Creates a new Server-Sent Events stream of the specified
content. |
static HttpResponse |
JsonTextSequences.fromObject(ResponseHeaders headers,
Object content)
Creates a new JSON Text Sequences of the specified
content. |
static HttpResponse |
JsonTextSequences.fromObject(ResponseHeaders headers,
Object content,
HttpHeaders trailers,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new JSON Text Sequences of the specified
content. |
static HttpResponse |
JsonTextSequences.fromObject(ResponseHeaders headers,
Object content,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new JSON Text Sequences of the specified
content. |
static HttpResponse |
JsonTextSequences.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<?> contentPublisher)
Creates a new JSON Text Sequences from the specified
Publisher. |
static HttpResponse |
JsonTextSequences.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<?> contentPublisher,
HttpHeaders trailers,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new JSON Text Sequences from the specified
Publisher. |
static HttpResponse |
JsonTextSequences.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<?> contentPublisher,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new JSON Text Sequences from the specified
Publisher. |
static HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<? extends ServerSentEvent> contentPublisher)
Creates a new Server-Sent Events stream from the specified
Publisher. |
static HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<? extends ServerSentEvent> contentPublisher,
HttpHeaders trailers)
Creates a new Server-Sent Events stream from the specified
Publisher. |
static <T> HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<T> contentPublisher,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Publisher and converter. |
static <T> HttpResponse |
ServerSentEvents.fromPublisher(ResponseHeaders headers,
org.reactivestreams.Publisher<T> contentPublisher,
HttpHeaders trailers,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Publisher and converter. |
static HttpResponse |
JsonTextSequences.fromStream(ResponseHeaders headers,
Stream<?> contentStream,
Executor executor)
Creates a new JSON Text Sequences from the specified
Stream. |
static HttpResponse |
JsonTextSequences.fromStream(ResponseHeaders headers,
Stream<?> contentStream,
Executor executor,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new JSON Text Sequences from the specified
Stream. |
static HttpResponse |
JsonTextSequences.fromStream(ResponseHeaders headers,
Stream<?> contentStream,
HttpHeaders trailers,
Executor executor,
com.fasterxml.jackson.databind.ObjectMapper mapper)
Creates a new JSON Text Sequences from the specified
Stream. |
static HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<? extends ServerSentEvent> contentStream,
Executor executor)
Creates a new Server-Sent Events stream from the specified
Stream. |
static HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<? extends ServerSentEvent> contentStream,
HttpHeaders trailers,
Executor executor)
Creates a new Server-Sent Events stream from the specified
Stream. |
static <T> HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<T> contentStream,
Executor executor,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Stream and converter. |
static <T> HttpResponse |
ServerSentEvents.fromStream(ResponseHeaders headers,
Stream<T> contentStream,
HttpHeaders trailers,
Executor executor,
Function<? super T,? extends ServerSentEvent> converter)
Creates a new Server-Sent Events stream from the specified
Stream and converter. |
Copyright © 2020 LeanCloud. All rights reserved.