return new ExampleRoute();
}
@Provides(priority = 12000) // we set a priority higher than ResponseCloseFilter, so that response is not closed after the handle
public RestxRouteFilter routeFilterExample() {
return new RestxRouteFilter() {
@Override
public Optional<RestxHandlerMatch> match(RestxRoute route) {
// here we decide to apply the filter or not based on the route class.
// but we could decide on any route property, for instance relying on the fact that routes generated
// by @{GET,POST,PUT,DELETE} are always StdEntityRoute instances and their matcher always StdRouteMatcher