java.lang.Object
cloud.piranha.nano.NanoServletConfig
- All Implemented Interfaces:
jakarta.servlet.ServletConfig
The ServletConfig class used by
NanoPiranhaBuilder
so it can initialize the Servlet.- Author:
- Manfred Riem (mriem@manorrock.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionStores the init parameters.private final jakarta.servlet.ServletContextStores the servlet context.private StringStores the servlet name. -
Constructor Summary
ConstructorsConstructorDescriptionNanoServletConfig(jakarta.servlet.ServletContext servletContext) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetInitParameter(String name) Get the init parameter.Returns the init parameter names.jakarta.servlet.ServletContextReturns the servlet context.Returns the servlet name.voidsetInitParameter(String name, String value) Set the init parameter.voidsetServletName(String servletName) Set the servlet name.
-
Field Details
-
initParameters
Stores the init parameters. -
servletContext
private final jakarta.servlet.ServletContext servletContextStores the servlet context. -
servletName
Stores the servlet name.
-
-
Constructor Details
-
NanoServletConfig
public NanoServletConfig(jakarta.servlet.ServletContext servletContext) Constructor.- Parameters:
servletContext- the servlet context.
-
-
Method Details
-
getInitParameter
Get the init parameter.- Specified by:
getInitParameterin interfacejakarta.servlet.ServletConfig- Parameters:
name- the name.- Returns:
- the value, or null if not found.
-
getInitParameterNames
Returns the init parameter names.- Specified by:
getInitParameterNamesin interfacejakarta.servlet.ServletConfig- Returns:
- the init parameter names
-
getServletContext
public jakarta.servlet.ServletContext getServletContext()Returns the servlet context.- Specified by:
getServletContextin interfacejakarta.servlet.ServletConfig- Returns:
- the servlet context
-
getServletName
Returns the servlet name.- Specified by:
getServletNamein interfacejakarta.servlet.ServletConfig- Returns:
- the servlet name
-
setInitParameter
Set the init parameter.- Parameters:
name- the name.value- the value.
-
setServletName
Set the servlet name.- Parameters:
servletName- the servlet name.
-