| Package | Description |
|---|---|
| com.linecorp.armeria.common.logging |
| Modifier and Type | Class and Description |
|---|---|
class |
ContentPreviewerAdapter
A skeletal
ContentPreviewer implementation in order for a user to implement only the methods
what he or she really needs. |
| Modifier and Type | Method and Description |
|---|---|
static ContentPreviewer |
ContentPreviewer.disabled()
A dummy
ContentPreviewer which discards everything it collected and produces null. |
ContentPreviewer |
ContentPreviewerFactory.get(RequestContext ctx,
HttpHeaders headers)
|
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. |
static ContentPreviewer |
ContentPreviewer.ofBinary(int length,
Function<? 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. |
static ContentPreviewer |
ContentPreviewer.ofText(int length)
Creates a new instance of
ContentPreviewer which produces the text
with the maximum length limit. |
static ContentPreviewer |
ContentPreviewer.ofText(int length,
Charset defaultCharset)
Creates a new instance of
ContentPreviewer which produces the text
with the maximum length limit. |
| Modifier and Type | Method and Description |
|---|---|
static ContentPreviewerFactory |
ContentPreviewerFactory.of(Map<MediaType,? extends Supplier<? extends ContentPreviewer>> map)
Creates a new instance of
ContentPreviewerFactory which creates a ContentPreviewer
through the supplier that matches with "content-type" header. |
static ContentPreviewerFactory |
ContentPreviewerFactory.of(MediaType contentType,
Supplier<? extends ContentPreviewer> supplier)
Creates a new instance of
ContentPreviewerFactory which creates a ContentPreviewer
through supplier for the request/response with the contentType. |
static ContentPreviewerFactory |
ContentPreviewerFactory.of(String contentType,
Supplier<? extends ContentPreviewer> supplier)
Creates a new instance of
ContentPreviewerFactory which creates a ContentPreviewer
through supplier for the request/response with the contentType. |
static ContentPreviewerFactory |
ContentPreviewerFactory.of(Supplier<? extends ContentPreviewer> supplier,
Iterable<MediaType> contentTypes)
Creates a new instance of
ContentPreviewerFactory which creates a ContentPreviewer
through supplier if a request/response matches any of contentTypes. |
static ContentPreviewerFactory |
ContentPreviewerFactory.of(Supplier<? extends ContentPreviewer> supplier,
MediaType... contentTypes)
Creates a new instance of
ContentPreviewerFactory which creates a ContentPreviewer
through supplier if a request/response matches any of contentTypes. |
static ContentPreviewerFactory |
ContentPreviewerFactory.of(Supplier<? extends ContentPreviewer> supplier,
String... contentTypes)
Creates a new instance of
ContentPreviewerFactory which creates a ContentPreviewer
through supplier if the content type of a request/response matches any of contentTypes. |
Copyright © 2020 LeanCloud. All rights reserved.