Class NanoPiranhaBuilder


  • public class NanoPiranhaBuilder
    extends Object
    The builder so you can easily build instances of NanoPiranha.
    Author:
    Manfred Riem (mriem@manorrock.com)
    See Also:
    NanoPiranha
    • Constructor Detail

      • NanoPiranhaBuilder

        public NanoPiranhaBuilder()
        Constructor.
    • Method Detail

      • build

        public NanoPiranha build()
        Build Piranha Nano.
        Returns:
        our instance of Piranha Nano.
      • directoryResource

        public NanoPiranhaBuilder directoryResource​(String directory)
        Add a directory resource.
        Parameters:
        directory - the directory resource.
        Returns:
        the builder.
      • filter

        public NanoPiranhaBuilder filter​(String filterName,
                                         Filter filter)
        Add a filter.
        Parameters:
        filterName - the filter name.
        filter - the filter.
        Returns:
        the builder.
      • filterInitParam

        public NanoPiranhaBuilder filterInitParam​(String filterName,
                                                  String name,
                                                  String value)
        Set a filter init parameter.
        Parameters:
        filterName - the filter name.
        name - the name.
        value - the value.
        Returns:
        the builder.
      • servlet

        public NanoPiranhaBuilder servlet​(String servletName,
                                          Servlet servlet)
        Set the Servlet.
        Parameters:
        servletName - the Servlet name.
        servlet - the Servlet.
        Returns:
        the builder.
      • servletInitParam

        public NanoPiranhaBuilder servletInitParam​(String servletName,
                                                   String name,
                                                   String value)
        Set a servlet init parameter.
        Parameters:
        servletName - the servlet name.
        name - the name.
        value - the value.
        Returns:
        the builder.
      • webApplication

        public NanoPiranhaBuilder webApplication​(WebApplication webApplication)
        Set the web application.
        Parameters:
        webApplication - the web application.
        Returns:
        the builder.