class NanoPiranha implements Piranha {

    public void service(ServletRequest servletRequest, ServletResponse servletResponse)
            throws IOException, ServletException {
        Iterator<Filter> iterator = filters.descendingIterator();
        NanoFilterChain chain = new NanoFilterChain(servlet);
        while (iterator.hasNext()) {
            Filter filter = iterator.next();
            NanoFilterChain previousChain = chain;
            chain = new NanoFilterChain(filter, previousChain);
        }
        if (servletRequest.getServletContext() == null
                && servletRequest instanceof NanoRequest) {
            NanoRequest nanoRequest = (NanoRequest) servletRequest;
            nanoRequest.setWebApplication(webApplication);
        }
        if (servletResponse instanceof NanoResponse) {
            NanoResponse nanoResponse = (NanoResponse) servletResponse;
            nanoResponse.setWebApplication(webApplication);
        }
        chain.doFilter(servletRequest, servletResponse);
        servletResponse.flushBuffer();
    }

    public  NanoPiranha();

}