类 FixedContentNegotiationStrategy
java.lang.Object
cn.taketoday.web.accept.FixedContentNegotiationStrategy
- 所有已实现的接口:
ContentNegotiationStrategy
A
ContentNegotiationStrategy that returns a fixed content type.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
-
字段概要
字段从接口继承的字段 cn.taketoday.web.accept.ContentNegotiationStrategy
MEDIA_TYPE_ALL_LIST -
构造器概要
构造器构造器说明FixedContentNegotiationStrategy(MediaType contentType) Constructor with a single defaultMediaType.FixedContentNegotiationStrategy(List<MediaType> contentTypes) Constructor with an ordered List of defaultMediaType's to return for use in applications that support a variety of content types. -
方法概要
修饰符和类型方法说明Return the configured list of media types.resolveMediaTypes(RequestContext request) Resolve the given request to a list of media types.
-
字段详细资料
-
contentTypes
-
-
构造器详细资料
-
FixedContentNegotiationStrategy
Constructor with a single defaultMediaType. -
FixedContentNegotiationStrategy
Constructor with an ordered List of defaultMediaType's to return for use in applications that support a variety of content types.Consider appending
MediaType.ALLat the end if destinations are present which do not support any of the other default media types.
-
-
方法详细资料
-
getContentTypes
Return the configured list of media types. -
resolveMediaTypes
从接口复制的说明:ContentNegotiationStrategyResolve the given request to a list of media types. The returned list is ordered by specificity first and by quality parameter second.- 指定者:
resolveMediaTypes在接口中ContentNegotiationStrategy- 参数:
request- the current request context- 返回:
- the requested media types, or
ContentNegotiationStrategy.MEDIA_TYPE_ALL_LISTif none were requested.
-