@Requires(beans=ViewsRenderer.class) @Filter(value="/**") public class ViewsFilter extends Object implements HttpServerFilter
| Modifier and Type | Field and Description |
|---|---|
protected BeanLocator |
beanLocator |
protected Integer |
order |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
ViewsFilter(BeanLocator beanLocator,
ViewsFilterOrderProvider viewsFilterOrderProvider)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Publisher<MutableHttpResponse<?>> |
doFilter(HttpRequest<?> request,
ServerFilterChain chain)
Variation of the
HttpServerFilter.doFilter(HttpRequest, FilterChain) method that accepts a ServerFilterChain
which allows to mutate the outgoing HTTP response. |
int |
getOrder() |
protected Object |
resolveModel(Object responseBody)
Resolves the model for the given response body.
|
protected Optional<String> |
resolveView(AnnotationMetadata route,
Object responseBody)
Resolves the view for the given method and response body.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoFilterprotected final Integer order
protected final BeanLocator beanLocator
public ViewsFilter(BeanLocator beanLocator, @Nullable ViewsFilterOrderProvider viewsFilterOrderProvider)
beanLocator - The bean locatorviewsFilterOrderProvider - The order providerpublic int getOrder()
public final Publisher<MutableHttpResponse<?>> doFilter(HttpRequest<?> request, ServerFilterChain chain)
HttpServerFilterHttpServerFilter.doFilter(HttpRequest, FilterChain) method that accepts a ServerFilterChain
which allows to mutate the outgoing HTTP response.doFilter in interface HttpServerFilterrequest - The requestchain - The chainPublisher that emits a MutableHttpResponseHttpServerFilter.doFilter(HttpRequest, FilterChain)protected Object resolveModel(Object responseBody)
responseBody - Response bodyprotected Optional<String> resolveView(AnnotationMetadata route, Object responseBody)
route - Request routeresponseBody - Response body