Class DefaultWebApplicationBuilder

java.lang.Object
cloud.piranha.core.impl.DefaultWebApplicationBuilder

public class DefaultWebApplicationBuilder extends Object
The default WebApplication builder.
Author:
Manfred Riem ([email protected])
  • Constructor Details

    • DefaultWebApplicationBuilder

      public DefaultWebApplicationBuilder()
      Constructor.
    • DefaultWebApplicationBuilder

      public DefaultWebApplicationBuilder(WebApplication webApplication)
      Constructor.
      Parameters:
      webApplication - the web application.
  • Method Details

    • build

      public WebApplication build()
      Build the web application.
      Returns:
      the web application.
    • directoryResource

      public DefaultWebApplicationBuilder directoryResource(String directory)
      Add a directory resource.
      Parameters:
      directory - the directory.
      Returns:
      the web application builder.
    • filter

      public DefaultWebApplicationBuilder filter(String name, String className)
      Add a filter.
      Parameters:
      name - the name.
      className - the class name.
      Returns:
      the web application builder.
    • filter

      public DefaultWebApplicationBuilder filter(String name, Class<? extends jakarta.servlet.Filter> clazz)
      Add a filter.
      Parameters:
      name - the name.
      clazz - the filter class.
      Returns:
      the web application builder.
    • filter

      public DefaultWebApplicationBuilder filter(String name, jakarta.servlet.Filter filter)
      Add a filter.
      Parameters:
      name - the name.
      filter - the filter.
      Returns:
      the web application builder.
    • filterInitParam

      public DefaultWebApplicationBuilder filterInitParam(String filterName, String name, String value)
      Set a filter init parameter.
      Parameters:
      filterName - the name of the filter.
      name - the name of the parameter.
      value - the value of the parameter.
      Returns:
      the web application builder.
    • initParam

      public DefaultWebApplicationBuilder initParam(String name, String value)
      Add a init parameter.
      Parameters:
      name - the name.
      value - the value.
      Returns:
      the web application builder.
    • servlet

      public DefaultWebApplicationBuilder servlet(String name, String className)
      Add a servlet.
      Parameters:
      name - the name of the servlet.
      className - the class name of the servlet.
      Returns:
      the servlet builder.
    • servlet

      public DefaultWebApplicationBuilder servlet(String name, Class<? extends jakarta.servlet.Servlet> clazz)
      Add a servlet.
      Parameters:
      name - the name of the servlet.
      clazz - the class of the servlet.
      Returns:
      the web application builder.
    • servlet

      public DefaultWebApplicationBuilder servlet(String name, jakarta.servlet.Servlet servlet)
      Add a servlet.
      Parameters:
      name - the name of the servlet.
      servlet - the Servlet.
      Returns:
      the web application builder.
    • servletInitParam

      public DefaultWebApplicationBuilder servletInitParam(String servletName, String name, String value)
      Set a servlet init parameter.
      Parameters:
      servletName - the name of the servlet.
      name - the name of the parameter.
      value - the value of the parameter.
      Returns:
      the web application builder.
    • servletMapping

      public DefaultWebApplicationBuilder servletMapping(String servletName, String mapping)
      Add a servlet mapping.
      Parameters:
      servletName - the servlet name.
      mapping - the mapping.
      Returns:
      the web application builder.
    • webApplication

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