public class ServerResponseResultHandler extends Object implements HandlerResultHandler, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered
HandlerResultHandler implementation that supports ServerResponses.| Constructor and Description |
|---|
ServerResponseResultHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
int |
getOrder() |
reactor.core.publisher.Mono<Void> |
handleResult(org.springframework.web.server.ServerWebExchange exchange,
HandlerResult result)
Process the given result modifying response headers and/or writing data
to the response.
|
void |
setMessageWriters(List<org.springframework.http.codec.HttpMessageWriter<?>> configurer)
Configure HTTP message writers to serialize the request body with.
|
void |
setOrder(int order)
Set the order for this result handler relative to others.
|
void |
setViewResolvers(List<ViewResolver> viewResolvers) |
boolean |
supports(HandlerResult result)
Whether this handler supports the given
HandlerResult. |
public void setMessageWriters(List<org.springframework.http.codec.HttpMessageWriter<?>> configurer)
By default this is set to ServerCodecConfigurer's default writers.
public void setViewResolvers(List<ViewResolver> viewResolvers)
public void setOrder(int order)
By default set to 0. It is generally safe to place it early in the order as it looks for a concrete return type.
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic boolean supports(HandlerResult result)
HandlerResultHandlerHandlerResult.supports in interface HandlerResultHandlerresult - the result object to checkpublic reactor.core.publisher.Mono<Void> handleResult(org.springframework.web.server.ServerWebExchange exchange, HandlerResult result)
HandlerResultHandlerhandleResult in interface HandlerResultHandlerexchange - current server exchangeresult - the result from the handlingMono<Void> to indicate when request handling is complete.