@Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
            FilterChain filterChain) throws IOException, ServletException
    {
        if ( servletRequest instanceof HttpServletRequest )
        {
            final HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest;
            final String requestPath = ( httpServletRequest.getContextPath() + httpServletRequest.getServletPath() + httpServletRequest.getPathInfo() ).toLowerCase();

            final List<Filter> applicableFilters = new ArrayList<>();
            for ( final Map.Entry<String, List<Filter>> entry : filters.entrySet() )
            {
                String filterUrl = entry.getKey();
                if ( filterUrl.endsWith( "*" ))
                {
                    filterUrl = filterUrl.substring( 0, filterUrl.length() -1 );
                }
                filterUrl = filterUrl.toLowerCase();

                if ( requestPath.startsWith( filterUrl ) )
                {
                    applicableFilters.addAll(entry.getValue());
                }
            }
            if ( !applicableFilters.isEmpty() )
            {
                Log.debug( "Wrapping filter chain in order to run plugin-specific filters." );
                filterChain = new FilterChainInjector( filterChain, applicableFilters );
            }
        }
        else
        {
            Log.warn( "ServletRequest is not an instance of an HttpServletRequest." );
        }

        // Plugin filtering is done. Progress down the filter chain that was initially provided.
        filterChain.doFilter(servletRequest, servletResponse);
    }
This class is a Filter implementation itself. It acts as a dynamic proxy to filters that are registered by
Openfire plugins.
xmppserver/src/main/java/org/jivesoftware/admin/PluginFilter.java