Class JsonViewServerFilter
java.lang.Object
io.micronaut.http.server.netty.jackson.JsonViewServerFilter
- All Implemented Interfaces:
Ordered
,HttpFilter
,HttpServerFilter
@Requires(beans=JsonConfiguration.class) @Requires(classes=com.fasterxml.jackson.annotation.JsonView.class) @Requires(property="jackson.json-view.enabled")
@Filter("/**")
public class JsonViewServerFilter
extends Object
implements HttpServerFilter
Jackson @JsonView filter.
- Since:
- 1.1
- Author:
- mmindenhall, graemerocher
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Property used to specify whether JSON view is enabled.Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionJsonViewServerFilter
(io.micronaut.http.server.netty.jackson.JsonViewCodecResolver jsonViewCodecResolver, ExecutorService executorService, ConversionService conversionService) -
Method Summary
Modifier and TypeMethodDescriptiondoFilter
(HttpRequest<?> request, ServerFilterChain chain) Variation of theHttpServerFilter.doFilter(HttpRequest, FilterChain)
method that accepts aServerFilterChain
which allows to mutate the outgoing HTTP response.int
getOrder()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.filter.HttpServerFilter
doFilter
-
Field Details
-
PROPERTY_JSON_VIEW_ENABLED
Property used to specify whether JSON view is enabled.- See Also:
-
-
Constructor Details
-
JsonViewServerFilter
public JsonViewServerFilter(io.micronaut.http.server.netty.jackson.JsonViewCodecResolver jsonViewCodecResolver, @Named("blocking") ExecutorService executorService, ConversionService conversionService) - Parameters:
jsonViewCodecResolver
- The JSON view codec resolver.executorService
- The I/O executor serviceconversionService
- The conversion service
-
-
Method Details
-
doFilter
Description copied from interface:HttpServerFilter
Variation of theHttpServerFilter.doFilter(HttpRequest, FilterChain)
method that accepts aServerFilterChain
which allows to mutate the outgoing HTTP response.- Specified by:
doFilter
in interfaceHttpServerFilter
- Parameters:
request
- The requestchain
- The chain- Returns:
- A
Publisher
that emits aMutableHttpResponse
- See Also:
-
getOrder
public int getOrder()
-