org.springframework.web.reactive.function.server.support

## Class ServerResponseResultHandler

- java.lang.Object
- - org.springframework.web.reactive.function.server.support.ServerResponseResultHandler

All Implemented Interfaces:
  org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered, HandlerResultHandler

    public class ServerResponseResultHandler
    extends Object
    implements HandlerResultHandler, org.springframework.beans.factory.InitializingBean, org.springframework.core.Ordered

`HandlerResultHandler` implementation that supports `ServerResponses`.

Since:
  5.0
Author:
  Arjen Poutsma

### Field Summary

### Fields inherited from interface org.springframework.core.Ordered

`HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE`

### Constructor Summary

Constructors
Constructor and Description
`ServerResponseResultHandler()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ServerResponseResultHandler

    public ServerResponseResultHandler()

### Method Detail

#### setMessageWriters

    public void setMessageWriters(List<org.springframework.http.codec.HttpMessageWriter<?>> configurer)

Configure HTTP message writers to serialize the request body with.

By default this is set to `ServerCodecConfigurer`'s default writers.

#### setViewResolvers

    public void setViewResolvers(List<ViewResolver> viewResolvers)

#### setOrder

    public void setOrder(int order)

Set the order for this result handler relative to others.

By default set to 0. It is generally safe to place it early in the order as it looks for a concrete return type.

#### getOrder

    public int getOrder()

Specified by:
  `getOrder` in interface `org.springframework.core.Ordered`

#### afterPropertiesSet

    public void afterPropertiesSet()
                            throws Exception

Specified by:
  `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
Throws:
  `Exception`

#### supports

    public boolean supports(HandlerResult result)

Description copied from interface: `HandlerResultHandler`
Whether this handler supports the given `HandlerResult`.

Specified by:
  `supports` in interface `HandlerResultHandler`
Parameters:
  `result` - the result object to check
Returns:
  whether or not this object can use the given result

#### handleResult

    public reactor.core.publisher.Mono<Void> handleResult(org.springframework.web.server.ServerWebExchange exchange,
                                                          HandlerResult result)

Description copied from interface: `HandlerResultHandler`
Process the given result modifying response headers and/or writing data to the response.

Specified by:
  `handleResult` in interface `HandlerResultHandler`
Parameters:
  `exchange` - current server exchange
  `result` - the result from the handling
Returns:
  `Mono<Void>` to indicate when request handling is complete.