java.lang.Object
cloud.piranha.nano.NanoServletConfig
- All Implemented Interfaces:
ServletConfig
class NanoServletConfig extends java.lang.Object implements ServletConfig
The ServletConfig class used by
NanoPiranhaBuilder
so it can initialize the Servlet.- Author:
- Manfred Riem (mriem@manorrock.com)
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap<java.lang.String,java.lang.String>initParametersStores the init parameters.private ServletContextservletContextStores the servlet context.private java.lang.StringservletNameStores the servlet name. -
Constructor Summary
Constructors Constructor Description NanoServletConfig(ServletContext servletContext)Constructor. -
Method Summary
Modifier and Type Method Description java.lang.StringgetInitParameter(java.lang.String name)Get the init parameter.java.util.Enumeration<java.lang.String>getInitParameterNames()Get the init parameter names.ServletContextgetServletContext()Get the servlet context.java.lang.StringgetServletName()Get the servlet name.voidsetInitParameter(java.lang.String name, java.lang.String value)Set the init parameter.voidsetServletName(java.lang.String servletName)Set the servlet name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
initParameters
private final java.util.HashMap<java.lang.String,java.lang.String> initParametersStores the init parameters. -
servletContext
Stores the servlet context. -
servletName
private java.lang.String servletNameStores the servlet name.
-
-
Constructor Details
-
NanoServletConfig
Constructor.- Parameters:
servletContext- the servlet context.
-
-
Method Details
-
getInitParameter
public java.lang.String getInitParameter(java.lang.String name)Get the init parameter.- Specified by:
getInitParameterin interfaceServletConfig- Parameters:
name- the name.- Returns:
- the value, or null if not found.
-
getInitParameterNames
public java.util.Enumeration<java.lang.String> getInitParameterNames()Get the init parameter names.- Specified by:
getInitParameterNamesin interfaceServletConfig- Returns:
- the init parameter names.
-
getServletContext
Get the servlet context.- Specified by:
getServletContextin interfaceServletConfig- Returns:
- the servlet context.
-
getServletName
public java.lang.String getServletName()Get the servlet name.- Specified by:
getServletNamein interfaceServletConfig- Returns:
- the servlet name.
-
setInitParameter
public void setInitParameter(java.lang.String name, java.lang.String value)Set the init parameter.- Parameters:
name- the name.value- the value.
-
setServletName
public void setServletName(java.lang.String servletName)Set the servlet name.- Parameters:
servletName- the servlet name.
-