Package io.micronaut.http.filter
Class OncePerRequestHttpServerFilter
- java.lang.Object
-
- io.micronaut.http.filter.OncePerRequestHttpServerFilter
-
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,HttpFilter,HttpServerFilter
@Deprecated public abstract class OncePerRequestHttpServerFilter extends java.lang.Object implements HttpServerFilter
Deprecated.All filters are executed once per request starting in Micronaut 3.0. Directly implementHttpServerFilterinstead of extending this class and replace any usages of `micronaut.once` attributes with a custom attribute name.A filter that is only executed once per request. A filter may be executed more than once per request if the original route throws an exception.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description OncePerRequestHttpServerFilter()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.reactivestreams.Publisher<MutableHttpResponse<?>>doFilter(HttpRequest<?> request, ServerFilterChain chain)Deprecated.Variation of theHttpServerFilter.doFilter(HttpRequest, FilterChain)method that accepts aServerFilterChainwhich allows to mutate the outgoing HTTP response.protected abstract org.reactivestreams.Publisher<MutableHttpResponse<?>>doFilterOnce(HttpRequest<?> request, ServerFilterChain chain)Deprecated.static java.lang.StringgetKey(java.lang.Class<? extends OncePerRequestHttpServerFilter> filterClass)Deprecated.Implement custom keys for request attributes based on the need of the filter.-
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
-
-
-
-
Method Detail
-
doFilter
public final org.reactivestreams.Publisher<MutableHttpResponse<?>> doFilter(HttpRequest<?> request, ServerFilterChain chain)
Deprecated.Description copied from interface:HttpServerFilterVariation of theHttpServerFilter.doFilter(HttpRequest, FilterChain)method that accepts aServerFilterChainwhich allows to mutate the outgoing HTTP response.- Specified by:
doFilterin interfaceHttpServerFilter- Parameters:
request- The requestchain- The chain- Returns:
- A
Publisherthat emits aMutableHttpResponse - See Also:
HttpServerFilter.doFilter(HttpRequest, FilterChain)
-
getKey
@Deprecated public static java.lang.String getKey(java.lang.Class<? extends OncePerRequestHttpServerFilter> filterClass)
Deprecated.Implement custom keys for request attributes based on the need of the filter.Obtain the key used to store the attribute within a request.- Parameters:
filterClass- the filter class- Returns:
- The key
-
doFilterOnce
protected abstract org.reactivestreams.Publisher<MutableHttpResponse<?>> doFilterOnce(HttpRequest<?> request, ServerFilterChain chain)
Deprecated.- Parameters:
request- TheHttpRequestinstancechain- TheServerFilterChaininstance- Returns:
- A
Publisherfor the Http response
-
-