| Package | Description |
|---|---|
| com.linecorp.armeria.client |
Client core.
|
| com.linecorp.armeria.common |
Common types.
|
| com.linecorp.armeria.common.logging | |
| com.linecorp.armeria.internal |
Various classes used internally.
|
| com.linecorp.armeria.internal.logging | |
| com.linecorp.armeria.server |
Server core.
|
| com.linecorp.armeria.server.annotation |
Annotations for building a RESTful service.
|
| com.linecorp.armeria.server.cors |
Cross-Origin Resource Sharing
(CORS) support.
|
| com.linecorp.armeria.server.docs |
Documentation service.
|
| com.linecorp.armeria.server.encoding |
HTTP content encoding 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 | Field and Description |
|---|---|
static ClientOption<HttpHeaders> |
ClientOption.HTTP_HEADERS
The additional HTTP headers to send with requests.
|
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
DefaultClientRequestContext.additionalRequestHeaders() |
HttpHeaders |
ClientRequestContextWrapper.additionalRequestHeaders() |
HttpHeaders |
ClientRequestContext.additionalRequestHeaders()
|
HttpHeaders |
ClientOptions.httpHeaders()
Returns the additional HTTP headers to send with requests.
|
| Modifier and Type | Method and Description |
|---|---|
static SafeCloseable |
Clients.withHttpHeaders(Function<HttpHeaders,HttpHeaders> headerManipulator)
Sets the specified HTTP header manipulating function in a thread-local variable so that the manipulated
headers are sent by the client call made from the current thread.
|
static SafeCloseable |
Clients.withHttpHeaders(Function<HttpHeaders,HttpHeaders> headerManipulator)
Sets the specified HTTP header manipulating function in a thread-local variable so that the manipulated
headers are sent by the client call made from the current thread.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
RequestHeaders
Immutable HTTP/2 headers for an
HttpRequest. |
interface |
ResponseHeaders
Immutable HTTP/2 headers for an
HttpResponse. |
| Modifier and Type | Field and Description |
|---|---|
static HttpHeaders |
HttpHeaders.EMPTY_HEADERS
Deprecated.
Use
of(). |
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
HttpHeadersBuilder.build()
Returns a newly created
HttpHeaders with the entries in this builder. |
static HttpHeaders |
HttpHeaders.of()
Returns an empty
HttpHeaders. |
static HttpHeaders |
HttpHeaders.of(CharSequence name,
Object value)
Returns a new
HttpHeaders with the specified header. |
static HttpHeaders |
HttpHeaders.of(CharSequence name1,
Object value1,
CharSequence name2,
Object value2)
Returns a new
HttpHeaders with the specified headers. |
static HttpHeaders |
HttpHeaders.of(CharSequence name1,
Object value1,
CharSequence name2,
Object value2,
CharSequence name3,
Object value3)
Returns a new
HttpHeaders with the specified headers. |
static HttpHeaders |
HttpHeaders.of(CharSequence name1,
Object value1,
CharSequence name2,
Object value2,
CharSequence name3,
Object value3,
CharSequence name4,
Object value4)
Returns a new
HttpHeaders with the specified headers. |
static HttpHeaders |
HttpHeaders.of(CharSequence name,
String value)
Returns a new
HttpHeaders with the specified header. |
static HttpHeaders |
HttpHeaders.of(CharSequence name1,
String value1,
CharSequence name2,
String value2)
Returns a new
HttpHeaders with the specified headers. |
static HttpHeaders |
HttpHeaders.of(CharSequence name1,
String value1,
CharSequence name2,
String value2,
CharSequence name3,
String value3)
Returns a new
HttpHeaders with the specified headers. |
static HttpHeaders |
HttpHeaders.of(CharSequence name1,
String value1,
CharSequence name2,
String value2,
CharSequence name3,
String value3,
CharSequence name4,
String value4)
Returns a new
HttpHeaders with the specified headers. |
default HttpHeaders |
HttpHeaders.withMutations(Consumer<HttpHeadersBuilder> mutator)
Returns a new headers which is the result from the mutation by the specified
Consumer. |
| Modifier and Type | Method and Description |
|---|---|
static ResponseHeaders |
ResponseHeaders.of(HttpHeaders headers)
Returns a new
ResponseHeaders copied from the specified HttpHeaders. |
static RequestHeaders |
RequestHeaders.of(HttpHeaders headers)
Returns a new
RequestHeaders copied from the specified HttpHeaders. |
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,
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 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,
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,
HttpHeaders trailers)
Deprecated.
|
void |
HttpHeadersJsonSerializer.serialize(HttpHeaders headers,
com.fasterxml.jackson.core.JsonGenerator gen,
com.fasterxml.jackson.databind.SerializerProvider serializers) |
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
RequestLog.requestTrailers()
Returns the HTTP trailers of the
Request. |
HttpHeaders |
DefaultRequestLog.requestTrailers() |
HttpHeaders |
RequestLog.responseTrailers()
Returns the HTTP trailers of the
Response. |
HttpHeaders |
DefaultRequestLog.responseTrailers() |
| Modifier and Type | Method and Description |
|---|---|
protected Function<? super HttpHeaders,?> |
LoggingDecoratorBuilder.requestHeadersSanitizer()
Returns the
Function to use to sanitize request headers before logging. |
protected Function<? super HttpHeaders,?> |
LoggingDecoratorBuilder.requestTrailersSanitizer()
Returns the
Function to use to sanitize request trailers before logging. |
protected Function<? super HttpHeaders,?> |
LoggingDecoratorBuilder.responseHeadersSanitizer()
Returns the
Function to use to sanitize response headers before logging. |
protected Function<? super HttpHeaders,?> |
LoggingDecoratorBuilder.responseTrailersSanitizer()
Returns the
Function to use to sanitize response trailers before logging. |
| Modifier and Type | Method and Description |
|---|---|
ContentPreviewer |
ContentPreviewerFactory.get(RequestContext ctx,
HttpHeaders headers)
|
void |
ContentPreviewerAdapter.onHeaders(HttpHeaders headers) |
void |
ContentPreviewer.onHeaders(HttpHeaders headers)
Invoked after request/response headers is received.
|
void |
RequestLogBuilder.requestTrailers(HttpHeaders requestTrailers)
Sets the
RequestLog.requestTrailers(). |
void |
DefaultRequestLog.requestTrailers(HttpHeaders requestTrailers) |
void |
RequestLogBuilder.responseTrailers(HttpHeaders responseTrailers)
Sets the
RequestLog.responseTrailers(). |
void |
DefaultRequestLog.responseTrailers(HttpHeaders responseTrailers) |
| Modifier and Type | Method and Description |
|---|---|
T |
LoggingDecoratorBuilder.headersSanitizer(Function<? super HttpHeaders,?> headersSanitizer)
Sets the
Function to use to sanitize request, response and trailers before logging. |
static ContentPreviewer |
ContentPreviewer.ofBinary(int length,
BiFunction<? super HttpHeaders,? super io.netty.buffer.ByteBuf,String> reproducer)
Creates a new instance of
ContentPreviewer which produces the preview through reproducer
when the contents have been aggregated more than length bytes. |
T |
LoggingDecoratorBuilder.requestHeadersSanitizer(Function<? super HttpHeaders,?> requestHeadersSanitizer)
Sets the
Function to use to sanitize request headers before logging. |
T |
LoggingDecoratorBuilder.requestTrailersSanitizer(Function<? super HttpHeaders,?> requestTrailersSanitizer)
Sets the
Function to use to sanitize request trailers before logging. |
T |
LoggingDecoratorBuilder.responseHeadersSanitizer(Function<? super HttpHeaders,?> responseHeadersSanitizer)
Sets the
Function to use to sanitize response headers before logging. |
T |
LoggingDecoratorBuilder.responseTrailersSanitizer(Function<? super HttpHeaders,?> responseTrailersSanitizer)
Sets the
Function to use to sanitize response trailers before logging. |
String |
RequestLog.toStringRequestOnly(Function<? super HttpHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer)
Returns the string representation of the
Request. |
String |
DefaultRequestLog.toStringRequestOnly(Function<? super HttpHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer) |
String |
RequestLog.toStringRequestOnly(Function<? super RequestHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer,
Function<? super HttpHeaders,?> trailersSanitizer)
Returns the string representation of the
Request. |
String |
DefaultRequestLog.toStringRequestOnly(Function<? super RequestHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer,
Function<? super HttpHeaders,?> trailersSanitizer) |
String |
RequestLog.toStringResponseOnly(Function<? super HttpHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer)
Returns the string representation of the
Response. |
String |
DefaultRequestLog.toStringResponseOnly(Function<? super HttpHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer) |
String |
RequestLog.toStringResponseOnly(Function<? super ResponseHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer,
Function<? super HttpHeaders,?> trailersSanitizer)
Returns the string representation of the
Response. |
String |
DefaultRequestLog.toStringResponseOnly(Function<? super ResponseHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer,
Function<? super HttpHeaders,?> trailersSanitizer) |
| Modifier and Type | Method and Description |
|---|---|
static HttpHeaders |
ArmeriaHttpUtil.toArmeria(io.netty.handler.codec.http2.Http2Headers headers,
boolean request,
boolean endOfStream)
Converts the specified Netty HTTP/2 into Armeria HTTP/2 headers.
|
static HttpHeaders |
ArmeriaHttpUtil.toArmeria(io.netty.handler.codec.http.HttpHeaders inHeaders)
Converts the specified Netty HTTP/1 headers into Armeria HTTP/2 headers.
|
| 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. |
protected abstract io.netty.channel.ChannelFuture |
HttpObjectEncoder.doWriteHeaders(int id,
int streamId,
HttpHeaders headers,
boolean endStream) |
protected io.netty.channel.ChannelFuture |
Http2ObjectEncoder.doWriteHeaders(int id,
int streamId,
HttpHeaders headers,
boolean endStream) |
protected io.netty.channel.ChannelFuture |
Http1ObjectEncoder.doWriteHeaders(int id,
int streamId,
HttpHeaders headers,
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. |
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. |
static void |
ArmeriaHttpUtil.toNettyHttp1(int streamId,
HttpHeaders inputHeaders,
io.netty.handler.codec.http.HttpHeaders outputHeaders,
io.netty.handler.codec.http.HttpVersion httpVersion,
boolean isTrailer,
boolean isRequest)
Translate and add HTTP/2 headers to HTTP/1.x headers.
|
static io.netty.handler.codec.http2.Http2Headers |
ArmeriaHttpUtil.toNettyHttp2(HttpHeaders in,
boolean server)
Converts the specified Armeria HTTP/2 headers into Netty HTTP/2 headers.
|
io.netty.channel.ChannelFuture |
HttpObjectEncoder.writeHeaders(int id,
int streamId,
HttpHeaders headers,
boolean endStream)
Writes an
HttpHeaders. |
| Constructor and Description |
|---|
HttpHeaderSubscriber(CompletableFuture<HttpHeaders> future)
Create a instance that subscribes until it receives
HttpHeaders. |
| Modifier and Type | Method and Description |
|---|---|
static void |
LoggingDecorators.logRequest(org.slf4j.Logger logger,
RequestLog log,
Function<? super RequestLog,LogLevel> requestLogLevelMapper,
Function<? super RequestHeaders,?> requestHeadersSanitizer,
Function<Object,?> requestContentSanitizer,
Function<? super HttpHeaders,?> requestTrailersSanitizer)
Logs a stringified request of
RequestLog. |
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. |
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 |
|---|---|
HttpHeaders |
ServiceRequestContextWrapper.additionalResponseHeaders() |
HttpHeaders |
ServiceRequestContext.additionalResponseHeaders()
|
HttpHeaders |
DefaultServiceRequestContext.additionalResponseHeaders() |
HttpHeaders |
ServiceRequestContextWrapper.additionalResponseTrailers() |
HttpHeaders |
ServiceRequestContext.additionalResponseTrailers()
Returns the
HttpHeaders which is returned along with any other trailers when a
Service completes an HttpResponse. |
HttpHeaders |
DefaultServiceRequestContext.additionalResponseTrailers() |
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
HttpResult.headers()
Returns the response
HttpHeaders which may not contain the ":status" header. |
default HttpHeaders |
HttpResult.trailers()
Returns the HTTP trailers of a response.
|
default HttpHeaders |
HttpResult.trailingHeaders()
Deprecated.
|
| 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) |
static <T> HttpResult<T> |
HttpResult.of(HttpHeaders headers)
Creates a new
HttpResult with the specified headers and without content. |
static <T> HttpResult<T> |
HttpResult.of(HttpHeaders headers,
T content)
Creates a new
HttpResult with the specified headers and content. |
static <T> HttpResult<T> |
HttpResult.of(HttpHeaders headers,
T content,
HttpHeaders trailers)
Creates a new
HttpResult with the specified headers, content and trailers. |
static <T> HttpResult<T> |
HttpResult.of(HttpStatus status,
T content,
HttpHeaders trailers)
Creates a new
HttpResult with the specified HttpStatus, content and trailers. |
| Modifier and Type | Method and Description |
|---|---|
HttpHeaders |
CorsPolicy.generatePreflightResponseHeaders()
Generates immutable HTTP response headers that should be added to a CORS preflight response.
|
| Modifier and Type | Method and Description |
|---|---|
List<HttpHeaders> |
ServiceSpecification.exampleHttpHeaders()
Returns the example HTTP headers of the services in this specification.
|
List<HttpHeaders> |
ServiceInfo.exampleHttpHeaders()
Returns the example HTTP headers of the service.
|
List<HttpHeaders> |
MethodInfo.exampleHttpHeaders()
Returns the example HTTP headers of the method.
|
| Modifier and Type | Method and Description |
|---|---|
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(Class<?> serviceType,
HttpHeaders... exampleHttpHeaders)
Adds the example
HttpHeaders for the service with the specified type. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(Class<?> serviceType,
String methodName,
HttpHeaders... exampleHttpHeaders)
Adds the example
HttpHeaders for the method with the specified type and method name. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(HttpHeaders... exampleHttpHeaders)
Adds the example
HttpHeaders which are applicable to any services. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(String serviceName,
HttpHeaders... exampleHttpHeaders)
Adds the example
HttpHeaders for the service with the specified name. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(String serviceName,
String methodName,
HttpHeaders... exampleHttpHeaders)
Adds the example
HttpHeaders for the method with the specified service and method name. |
| Modifier and Type | Method and Description |
|---|---|
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(Class<?> serviceType,
Iterable<? extends HttpHeaders> exampleHttpHeaders)
Adds the example
HttpHeaders for the service with the specified type. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(Class<?> serviceType,
String methodName,
Iterable<? extends HttpHeaders> exampleHttpHeaders)
Adds the example
HttpHeaders for the method with the specified type and method name. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(Iterable<? extends HttpHeaders> exampleHttpHeaders)
Adds the example
HttpHeaders which are applicable to any services. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(String serviceName,
Iterable<? extends HttpHeaders> exampleHttpHeaders)
Adds the example
HttpHeaders for the service with the specified name. |
DocServiceBuilder |
DocServiceBuilder.exampleHttpHeaders(String serviceName,
String methodName,
Iterable<? extends HttpHeaders> exampleHttpHeaders)
Adds the example
HttpHeaders for the method with the specified service and method name. |
| Constructor and Description |
|---|
MethodInfo(String name,
TypeSignature returnTypeSignature,
Iterable<FieldInfo> parameters,
Iterable<TypeSignature> exceptionTypeSignatures,
Iterable<EndpointInfo> endpoints,
Iterable<HttpHeaders> exampleHttpHeaders,
Iterable<String> exampleRequests,
HttpMethod httpMethod,
String docString)
Creates a new instance.
|
ServiceInfo(String name,
Iterable<MethodInfo> methods,
Iterable<HttpHeaders> exampleHttpHeaders,
String docString)
Creates a new instance.
|
ServiceSpecification(Iterable<ServiceInfo> services,
Iterable<EnumInfo> enums,
Iterable<StructInfo> structs,
Iterable<ExceptionInfo> exceptions,
Iterable<HttpHeaders> exampleHttpHeaders)
Creates a new instance.
|
| Constructor and Description |
|---|
HttpEncodingService(HttpService delegate,
Predicate<MediaType> encodableContentTypePredicate,
Predicate<HttpHeaders> encodableRequestHeadersPredicate,
long minBytesToForceChunkedAndEncoding)
Creates a new
SimpleDecoratingHttpService that HTTP-encodes the response data published from
delegate. |
| Modifier and Type | Method and Description |
|---|---|
protected HttpHeaders |
AbstractHttpFileBuilder.buildHeaders()
Returns the immutable additional
HttpHeaders which will be set when building an
HttpResponse. |
HttpHeaders |
HttpFileServiceConfig.headers()
Returns the additional
HttpHeaders to send in a response. |
protected HttpHeaders |
AbstractHttpFile.headers()
Returns the immutable additional
HttpHeaders which will be set when building an
HttpResponse. |
| Modifier and Type | Method and Description |
|---|---|
HttpFile |
HttpVfs.get(String path,
Clock clock,
String contentEncoding,
HttpHeaders additionalHeaders)
Finds the file at the specified
path. |
| Constructor and Description |
|---|
AbstractHttpFile(MediaType contentType,
Clock clock,
boolean dateEnabled,
boolean lastModifiedEnabled,
BiFunction<String,HttpFileAttributes,String> entityTagFunction,
HttpHeaders headers)
Creates a new instance.
|
StreamingHttpFile(MediaType contentType,
Clock clock,
boolean dateEnabled,
boolean lastModifiedEnabled,
BiFunction<String,HttpFileAttributes,String> entityTagFunction,
HttpHeaders headers)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
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,
HttpHeaders trailers,
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,
HttpHeaders trailers,
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,
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,
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,
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,
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,
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.