java.lang.Object
cloud.piranha.core.impl.DefaultWebApplicationBuilder
The default WebApplication builder.
- Author:
- Manfred Riem ([email protected])
-
Constructor Summary
ConstructorDescriptionConstructor.DefaultWebApplicationBuilder
(WebApplication webApplication) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the web application.directoryResource
(String directory) Add a directory resource.Add a filter.Add a filter.Add a filter.filterInitParam
(String filterName, String name, String value) Set a filter init parameter.Add a init parameter.Add a servlet.Add a servlet.Add a servlet.servletInitParam
(String servletName, String name, String value) Set a servlet init parameter.servletMapping
(String servletName, String mapping) Add a servlet mapping.webApplication
(WebApplication webApplication) Set the web application.
-
Constructor Details
-
DefaultWebApplicationBuilder
public DefaultWebApplicationBuilder()Constructor. -
DefaultWebApplicationBuilder
Constructor.- Parameters:
webApplication
- the web application.
-
-
Method Details
-
build
Build the web application.- Returns:
- the web application.
-
directoryResource
Add a directory resource.- Parameters:
directory
- the directory.- Returns:
- the web application builder.
-
filter
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
Add a filter.- Parameters:
name
- the name.filter
- the filter.- Returns:
- the web application builder.
-
filterInitParam
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
Add a init parameter.- Parameters:
name
- the name.value
- the value.- Returns:
- the web application builder.
-
servlet
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
Add a servlet.- Parameters:
name
- the name of the servlet.servlet
- the Servlet.- Returns:
- the web application builder.
-
servletInitParam
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
Add a servlet mapping.- Parameters:
servletName
- the servlet name.mapping
- the mapping.- Returns:
- the web application builder.
-
webApplication
Set the web application.- Parameters:
webApplication
- the web application.- Returns:
- the web application builder.
-