@@ -0,0 +1,1048 @@
+package com.wizzardo.servlet;%0A%0Aimport com.wizzardo.tools.collections.CollectionTools;%0A%0Aimport javax.servlet.*;%0Aimport java.io.IOException;%0A%0A/**%0A * Created by wizzardo on 01.01.15.%0A */%0Apublic class CustomFilter implements Filter %7B%0A%0A    volatile CollectionTools.Closure%3CVoid, FilterConfig%3E onInit;%0A    volatile Runnable onDestroy;%0A    volatile Handler handler;%0A%0A    @Override%0A    public void init(FilterConfig filterConfig) throws ServletException %7B%0A        if (onInit != null)%0A            onInit.execute(filterConfig);%0A    %7D%0A%0A    @Override%0A    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException %7B%0A        if (handler != null) %7B%0A            handler.handle(request, response, chain);%0A        %7D%0A    %7D%0A%0A    @Override%0A    public void destroy() %7B%0A        if (onDestroy != null)%0A            onDestroy.run();%0A    %7D%0A%0A    public static interface Handler %7B%0A        void handle(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException;%0A    %7D%0A%7D%0A

add CustomFilter for tests