code: public Filter createFilter(ConfigurableFilterConfig filterConfig) throws ServletException {
          return new Filter() {
  
              public void init(FilterConfig filterConfig) throws ServletException {
                  //Do init tasks here
              }
  
              public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
                  //do filter here
                  chain.doFilter(request, response);
              }
  
              public void destroy() {
                  //do destroy tasks here
              }
          };
      }
docs: /* (non-Javadoc)
  @see org.ops4j.pax.wicket.api.FilterFactory#createFilter(org.ops4j.pax.wicket.api.ConfigurableFilterConfig)