use of org.wildfly.extension.undertow.filters.FilterService in project wildfly by wildfly.
the class UndertowSubsystemTestCase method testCustomFilters.
private void testCustomFilters(KernelServices mainServices) {
ServiceController<FilterService> customFilter = (ServiceController<FilterService>) mainServices.getContainer().getService(UndertowService.FILTER.append("custom-filter"));
customFilter.setMode(ServiceController.Mode.ACTIVE);
FilterService connectionLimiterService = customFilter.getService().getValue();
HttpHandler result = connectionLimiterService.createHttpHandler(Predicates.truePredicate(), new PathHandler());
Assert.assertNotNull("handler should have been created", result);
}
use of org.wildfly.extension.undertow.filters.FilterService in project wildfly by wildfly.
the class UndertowSubsystem20TestCase method testCustomFilters.
private void testCustomFilters(KernelServices mainServices) {
ServiceController<FilterService> customFilter = (ServiceController<FilterService>) mainServices.getContainer().getService(UndertowService.FILTER.append("custom-filter"));
customFilter.setMode(ServiceController.Mode.ACTIVE);
FilterService connectionLimiterService = customFilter.getService().getValue();
HttpHandler result = connectionLimiterService.createHttpHandler(Predicates.truePredicate(), new PathHandler());
Assert.assertNotNull("handler should have been created", result);
}
Aggregations