public abstract class HandlerResultHandlerSupport extends Object implements org.springframework.core.Ordered
HandlerResultHandler with support for content negotiation and access to a
ReactiveAdapter registry.| Modifier | Constructor and Description |
|---|---|
protected |
HandlerResultHandlerSupport(RequestedContentTypeResolver contentTypeResolver,
org.springframework.core.ReactiveAdapterRegistry adapterRegistry) |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.core.ReactiveAdapter |
getAdapter(HandlerResult result)
Get a
ReactiveAdapter for the top-level return value type. |
org.springframework.core.ReactiveAdapterRegistry |
getAdapterRegistry()
Return the configured
ReactiveAdapterRegistry. |
RequestedContentTypeResolver |
getContentTypeResolver()
Return the configured
RequestedContentTypeResolver. |
int |
getOrder() |
protected org.springframework.http.MediaType |
selectMediaType(org.springframework.web.server.ServerWebExchange exchange,
Supplier<List<org.springframework.http.MediaType>> producibleTypesSupplier)
Select the best media type for the current request through a content negotiation algorithm.
|
void |
setOrder(int order)
Set the order for this result handler relative to others.
|
protected final Log logger
protected HandlerResultHandlerSupport(RequestedContentTypeResolver contentTypeResolver, org.springframework.core.ReactiveAdapterRegistry adapterRegistry)
public org.springframework.core.ReactiveAdapterRegistry getAdapterRegistry()
ReactiveAdapterRegistry.public RequestedContentTypeResolver getContentTypeResolver()
RequestedContentTypeResolver.public void setOrder(int order)
By default set to Ordered.LOWEST_PRECEDENCE, however see
Javadoc of sub-classes which may change this default.
order - the orderpublic int getOrder()
getOrder in interface org.springframework.core.Ordered@Nullable protected org.springframework.core.ReactiveAdapter getAdapter(HandlerResult result)
ReactiveAdapter for the top-level return value type.null if none@Nullable
protected org.springframework.http.MediaType selectMediaType(org.springframework.web.server.ServerWebExchange exchange,
Supplier<List<org.springframework.http.MediaType>> producibleTypesSupplier)
exchange - the current requestproducibleTypesSupplier - the media types that can be produced for the current requestnull if none