Package io.micronaut.http.annotation
Annotation Interface FilterMatcher
Stereotype annotation that helps to link together instance of the filter and http client that filter should be applied to.
In order to use you will need to create new annotation and apply
FilterMatcher
on it. After that apply newly
created annotation on both instance of the http filter and instance of a http client.
Example:
{@literal @}FilterMatcher
public @interface Metered {
...
}
{@literal @}Metered
public class MeteredHttpFilter implements HttpClientFilter {
....
}
{@literal @}Metered
private HttpClient httpClient;
In the example above only clients annotated with {@literal @}Metered
annotations are going to be filtered by MeteredHttpFilter- Since:
- 1.3.0
- Author:
- svishnyakoff, James Kleeh, graemerocher
-
Optional Element Summary
-
Field Summary
-
Field Details
-
NAME
The name of this annotation.
-
-
Element Details
-
methods
HttpMethod[] methods- Returns:
- The methods to match. Defaults to all
- Default:
- {}
-