public abstract class HandlerResultHandlerSupport
extends java.lang.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,
java.util.function.Supplier<java.util.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 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@Nullable
protected org.springframework.http.MediaType selectMediaType(org.springframework.web.server.ServerWebExchange exchange,
java.util.function.Supplier<java.util.List<org.springframework.http.MediaType>> producibleTypesSupplier)
exchange - the current requestproducibleTypesSupplier - the media types that can be produced for the current requestnull