use of es.moki.ratelimij.dropwizard.filter.RateLimited429EnforcerFeature in project ratelimitj by mokies.
the class RateLimitBundle method run.
@Override
public void run(final Configuration configuration, final Environment environment) {
environment.jersey().register(new RateLimitingFactoryProvider.Binder(requestRateLimiterFactory));
environment.jersey().register(new RateLimited429EnforcerFeature());
environment.lifecycle().manage(new Managed() {
@Override
public void start() {
}
@Override
public void stop() throws Exception {
requestRateLimiterFactory.close();
}
});
}
Aggregations