java.lang.Object
cloud.piranha.embedded.EmbeddedPiranhaBuilder
The builder so you can easily build instances of
EmbeddedPiranha
.- Author:
- Manfred Riem ([email protected])
- See Also:
EmbeddedPiranha
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaliasedDirectoryResource(String path, String alias)
Add an aliased directory resource.Add an attribute.build()
Build the Piranha Embedded instance.Build and starts the Piranha Embedded instance.directoryResource(String path)
Add a directory resource.extension(Class<? extends WebApplicationExtension> extensionClass)
Set the web application extension.extensions(Class<? extends WebApplicationExtension>... extensionClasses)
Set the web application extensions.Add a feature.Add a feature.Add a filter.Add a filter.filterInitParam(String filterName, String name, String value)
Set a filter init parameter.filterMapping(String filterName, String... urlPatterns)
Add a filter mapping.httpSessionManager(HttpSessionManager httpSessionManager)
Set the HTTP session manager.initializer(Class<?> initializerClass)
Add an initializer.initializer(String className)
Add an initializer.Add a servlet.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... urlPatterns)
Add a servlet mapping.stringResource(String path, String value)
Add a string resource.
-
Constructor Details
-
EmbeddedPiranhaBuilder
public EmbeddedPiranhaBuilder()Constructor.
-
-
Method Details
-
aliasedDirectoryResource
Add an aliased directory resource.- Parameters:
path
- the path.alias
- the alias.- Returns:
- the builder.
-
attribute
Add an attribute.- Parameters:
name
- the name.value
- the value.- Returns:
- the builder.
-
build
Build the Piranha Embedded instance.- Returns:
- the instance.
-
buildAndStart
Build and starts the Piranha Embedded instance.- Returns:
- the instance.
-
directoryResource
Add a directory resource.- Parameters:
path
- the path.- Returns:
- the builder.
-
extension
Set the web application extension.- Parameters:
extensionClass
- the extension class.- Returns:
- the builder.
-
extensions
@SafeVarargs public final EmbeddedPiranhaBuilder extensions(Class<? extends WebApplicationExtension>... extensionClasses)Set the web application extensions.- Parameters:
extensionClasses
- the extension classes.- Returns:
- the builder.
-
feature
Add a feature.- Parameters:
featureClass
- the feature class.- Returns:
- the builder.
-
feature
Add a feature.- Parameters:
className
- the class name.- Returns:
- the builder.
-
filter
Add a filter.- Parameters:
filterName
- the filter name.filterClass
- the filter class.- Returns:
- the builder.
-
filter
Add a filter.- Parameters:
filterName
- the filter name.className
- the class name.- Returns:
- the builder.
-
filterInitParam
Set a filter init parameter.- Parameters:
filterName
- the filter name.name
- the name.value
- the value.- Returns:
- the builder.
-
filterMapping
Add a filter mapping.- Parameters:
filterName
- the filter name.urlPatterns
- the URL patterns.- Returns:
- the builder.
-
httpSessionManager
Set the HTTP session manager.- Parameters:
httpSessionManager
- the HTTP session manager.- Returns:
- the builder.
-
initializer
Add an initializer.- Parameters:
initializerClass
- the class name.- Returns:
- the builder.
-
initializer
Add an initializer.- Parameters:
className
- the class name.- Returns:
- the builder.
-
servlet
Add a servlet.- Parameters:
servletName
- the servlet name.servletClass
- the servlet class.- Returns:
- the builder.
-
servlet
Add a servlet.- Parameters:
servletName
- the servlet name.className
- the class name.- Returns:
- the builder.
-
servlet
public EmbeddedPiranhaBuilder servlet(String servletName, Class<?> servletClass, boolean asyncSupported)Add a servlet.- Parameters:
servletName
- the servlet name.servletClass
- the servlet class.asyncSupported
- the async supported flag.- Returns:
- the builder.
-
servlet
public EmbeddedPiranhaBuilder servlet(String servletName, String className, boolean asyncSupported)Add a servlet.- Parameters:
servletName
- the servlet name.className
- the class name.asyncSupported
- the async supported flag.- Returns:
- the builder.
-
servletInitParam
Set a servlet init parameter.- Parameters:
servletName
- the servlet name.name
- the name.value
- the value.- Returns:
- the builder.
-
servletMapping
Add a servlet mapping.- Parameters:
servletName
- the servlet name.urlPatterns
- the URL patterns.- Returns:
- the builder.
-
stringResource
Add a string resource.- Parameters:
path
- the path.value
- the string value added under the given path.- Returns:
- the builder.
-