public interface ContentPreviewerFactory
ContentPreviewer.| Modifier and Type | Method and Description |
|---|---|
static ContentPreviewerFactoryBuilder |
builder()
Returns a newly created
ContentPreviewerFactoryBuilder. |
ContentPreviewer |
requestContentPreviewer(RequestContext ctx,
RequestHeaders headers)
|
ContentPreviewer |
responseContentPreviewer(RequestContext ctx,
ResponseHeaders resHeaders)
Returns a newly-created response
ContentPreviewer with the given RequestContext and
ResponseHeaders. |
static ContentPreviewerFactory |
text(int maxLength)
Returns a new
ContentPreviewerFactory which creates a ContentPreviewer. |
static ContentPreviewerFactory |
text(int maxLength,
Charset defaultCharset)
Returns a new
ContentPreviewerFactory which creates a ContentPreviewer. |
static ContentPreviewerFactoryBuilder builder()
ContentPreviewerFactoryBuilder.static ContentPreviewerFactory text(int maxLength)
ContentPreviewerFactory which creates a ContentPreviewer.
The ContentPreviewer produces the text with the maxLength limit
if the content type of the RequestHeaders or ResponseHeaders meets
any of the following conditions:
text/* or application/x-www-form-urlencoded"xml" or "json""+xml" or "+json"maxLength - the maximum length of the previewstatic ContentPreviewerFactory text(int maxLength, Charset defaultCharset)
ContentPreviewerFactory which creates a ContentPreviewer.
The ContentPreviewer produces the text with the maxLength limit
if the content type of the RequestHeaders or ResponseHeaders meets
any of the following conditions:
text/* or application/x-www-form-urlencoded"xml" or "json""+xml" or "+json"maxLength - the maximum length of the previewdefaultCharset - the default charset used when a charset is not specified in the
"content-type" headerContentPreviewer requestContentPreviewer(RequestContext ctx, RequestHeaders headers)
ContentPreviewer with the given RequestContext and
RequestHeaders. Note that the returned ContentPreviewer can be
ContentPreviewer.disabled().ContentPreviewer responseContentPreviewer(RequestContext ctx, ResponseHeaders resHeaders)
ContentPreviewer with the given RequestContext and
ResponseHeaders. Note that the returned ContentPreviewer can be
ContentPreviewer.disabled().Copyright © 2020 LeanCloud. All rights reserved.