private static Class<? extends Chainable> getFilterType(Object filter) {
            if (filter instanceof RequestFilter)
                return RequestFilter.class;
            else if (filter instanceof ResponseFilter)
                return ResponseFilter.class;
            else if (filter instanceof SecurityRequestFilter)
                return SecurityRequestFilter.class;
            else if (filter instanceof SecurityResponseFilter)
                return SecurityResponseFilter.class;
            throw new IllegalArgumentException("Unsupported filter type: " + filter.getClass().getName());
        }
Creates JDisc request/response filter chains.

@author Tony Vaagenes
@author bjorncs
container-core/src/main/java/com/yahoo/container/http/filter/FilterChainRepository.java