java.lang.Object
cloud.piranha.nano.NanoPiranhaBuilder
public class NanoPiranhaBuilder
extends java.lang.Object
The builder so you can easily build instances of
NanoPiranha.- Author:
- Manfred Riem (mriem@manorrock.com)
- See Also:
NanoPiranha
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>>filterInitParametersStores the filter init parameters map.private java.util.LinkedHashMap<java.lang.String,Filter>filtersStores the filter map.private java.util.List<cloud.piranha.resource.api.Resource>resourcesStores the resources.private ServletservletStores the servlet.private java.util.HashMap<java.lang.String,java.lang.String>servletInitParametersStores the servlet init parameters.private java.lang.StringservletNameStores the servlet name.private cloud.piranha.webapp.api.WebApplicationwebApplicationStores the web application. -
Constructor Summary
Constructors Constructor Description NanoPiranhaBuilder()Constructor. -
Method Summary
Modifier and Type Method Description NanoPiranhabuild()Build Piranha Nano.NanoPiranhaBuilderdirectoryResource(java.lang.String directory)Add a directory resource.NanoPiranhaBuilderfilter(java.lang.String filterName, Filter filter)Add a filter.NanoPiranhaBuilderfilterInitParam(java.lang.String filterName, java.lang.String name, java.lang.String value)Set a filter init parameter.NanoPiranhaBuilderservlet(java.lang.String servletName, Servlet servlet)Set the Servlet.NanoPiranhaBuilderservletInitParam(java.lang.String servletName, java.lang.String name, java.lang.String value)Set a servlet init parameter.NanoPiranhaBuilderwebApplication(cloud.piranha.webapp.api.WebApplication webApplication)Set the web application.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
filterInitParameters
private final java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.lang.String>> filterInitParametersStores the filter init parameters map. -
filters
Stores the filter map. -
resources
private final java.util.List<cloud.piranha.resource.api.Resource> resourcesStores the resources. -
servletInitParameters
private final java.util.HashMap<java.lang.String,java.lang.String> servletInitParametersStores the servlet init parameters. -
servlet
Stores the servlet. -
servletName
private java.lang.String servletNameStores the servlet name. -
webApplication
private cloud.piranha.webapp.api.WebApplication webApplicationStores the web application.
-
-
Constructor Details
-
NanoPiranhaBuilder
public NanoPiranhaBuilder()Constructor.
-
-
Method Details
-
build
Build Piranha Nano.- Returns:
- our instance of Piranha Nano.
-
directoryResource
Add a directory resource.- Parameters:
directory- the directory resource.- Returns:
- the builder.
-
filter
Add a filter.- Parameters:
filterName- the filter name.filter- the filter.- Returns:
- the builder.
-
filterInitParam
public NanoPiranhaBuilder filterInitParam(java.lang.String filterName, java.lang.String name, java.lang.String value)Set a filter init parameter.- Parameters:
filterName- the filter name.name- the name.value- the value.- Returns:
- the builder.
-
servlet
Set the Servlet.- Parameters:
servletName- the Servlet name.servlet- the Servlet.- Returns:
- the builder.
-
servletInitParam
public NanoPiranhaBuilder servletInitParam(java.lang.String servletName, java.lang.String name, java.lang.String value)Set a servlet init parameter.- Parameters:
servletName- the servlet name.name- the name.value- the value.- Returns:
- the builder.
-
webApplication
Set the web application.- Parameters:
webApplication- the web application.- Returns:
- the builder.
-