Package com.avoka.fc.core.test
Class NopServletContext
- java.lang.Object
-
- com.avoka.fc.core.test.NopServletContext
-
- All Implemented Interfaces:
ServletContext
public class NopServletContext extends Object implements ServletContext
This class provides a servlet context implementation that does nothing. It can be used during db-config loading.
-
-
Field Summary
-
Fields inherited from interface javax.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
-
Constructor Summary
Constructors Constructor Description NopServletContext()
-
Method Summary
-
-
-
Method Detail
-
setAttribute
public void setAttribute(String arg0, Object arg1)
- Specified by:
setAttribute
in interfaceServletContext
-
removeAttribute
public void removeAttribute(String arg0)
- Specified by:
removeAttribute
in interfaceServletContext
-
log
public void log(String arg0, Throwable arg1)
- Specified by:
log
in interfaceServletContext
-
log
public void log(Exception arg0, String arg1)
- Specified by:
log
in interfaceServletContext
-
log
public void log(String arg0)
- Specified by:
log
in interfaceServletContext
-
getServlets
public Enumeration getServlets()
- Specified by:
getServlets
in interfaceServletContext
-
getServletNames
public Enumeration getServletNames()
- Specified by:
getServletNames
in interfaceServletContext
-
getServletContextName
public String getServletContextName()
- Specified by:
getServletContextName
in interfaceServletContext
-
getServlet
public Servlet getServlet(String arg0) throws ServletException
- Specified by:
getServlet
in interfaceServletContext
- Throws:
ServletException
-
getServerInfo
public String getServerInfo()
- Specified by:
getServerInfo
in interfaceServletContext
-
getResourcePaths
public Set getResourcePaths(String arg0)
- Specified by:
getResourcePaths
in interfaceServletContext
-
getResourceAsStream
public InputStream getResourceAsStream(String arg0)
- Specified by:
getResourceAsStream
in interfaceServletContext
-
getResource
public URL getResource(String arg0) throws MalformedURLException
- Specified by:
getResource
in interfaceServletContext
- Throws:
MalformedURLException
-
getRequestDispatcher
public RequestDispatcher getRequestDispatcher(String arg0)
- Specified by:
getRequestDispatcher
in interfaceServletContext
-
getRealPath
public String getRealPath(String arg0)
- Specified by:
getRealPath
in interfaceServletContext
-
getNamedDispatcher
public RequestDispatcher getNamedDispatcher(String arg0)
- Specified by:
getNamedDispatcher
in interfaceServletContext
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersion
in interfaceServletContext
-
getMimeType
public String getMimeType(String arg0)
- Specified by:
getMimeType
in interfaceServletContext
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersion
in interfaceServletContext
-
getInitParameterNames
public Enumeration getInitParameterNames()
- Specified by:
getInitParameterNames
in interfaceServletContext
-
getInitParameter
public String getInitParameter(String arg0)
- Specified by:
getInitParameter
in interfaceServletContext
-
getContext
public ServletContext getContext(String arg0)
- Specified by:
getContext
in interfaceServletContext
-
getAttributeNames
public Enumeration getAttributeNames()
- Specified by:
getAttributeNames
in interfaceServletContext
-
getAttribute
public Object getAttribute(String arg0)
- Specified by:
getAttribute
in interfaceServletContext
-
addFilter
public FilterRegistration.Dynamic addFilter(String arg0, String arg1)
- Specified by:
addFilter
in interfaceServletContext
-
addFilter
public FilterRegistration.Dynamic addFilter(String arg0, Filter arg1)
- Specified by:
addFilter
in interfaceServletContext
-
addFilter
public FilterRegistration.Dynamic addFilter(String arg0, Class<? extends Filter> arg1)
- Specified by:
addFilter
in interfaceServletContext
-
addListener
public void addListener(String arg0)
- Specified by:
addListener
in interfaceServletContext
-
addListener
public <T extends EventListener> void addListener(T arg0)
- Specified by:
addListener
in interfaceServletContext
-
addListener
public void addListener(Class<? extends EventListener> arg0)
- Specified by:
addListener
in interfaceServletContext
-
addServlet
public ServletRegistration.Dynamic addServlet(String arg0, String arg1)
- Specified by:
addServlet
in interfaceServletContext
-
addServlet
public ServletRegistration.Dynamic addServlet(String arg0, Servlet arg1)
- Specified by:
addServlet
in interfaceServletContext
-
addServlet
public ServletRegistration.Dynamic addServlet(String arg0, Class<? extends Servlet> arg1)
- Specified by:
addServlet
in interfaceServletContext
-
createFilter
public <T extends Filter> T createFilter(Class<T> arg0) throws ServletException
- Specified by:
createFilter
in interfaceServletContext
- Throws:
ServletException
-
createListener
public <T extends EventListener> T createListener(Class<T> arg0) throws ServletException
- Specified by:
createListener
in interfaceServletContext
- Throws:
ServletException
-
createServlet
public <T extends Servlet> T createServlet(Class<T> arg0) throws ServletException
- Specified by:
createServlet
in interfaceServletContext
- Throws:
ServletException
-
declareRoles
public void declareRoles(String... arg0)
- Specified by:
declareRoles
in interfaceServletContext
-
getClassLoader
public ClassLoader getClassLoader()
- Specified by:
getClassLoader
in interfaceServletContext
-
getContextPath
public String getContextPath()
- Specified by:
getContextPath
in interfaceServletContext
-
getDefaultSessionTrackingModes
public Set<SessionTrackingMode> getDefaultSessionTrackingModes()
- Specified by:
getDefaultSessionTrackingModes
in interfaceServletContext
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()
- Specified by:
getEffectiveMajorVersion
in interfaceServletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()
- Specified by:
getEffectiveMinorVersion
in interfaceServletContext
-
getEffectiveSessionTrackingModes
public Set<SessionTrackingMode> getEffectiveSessionTrackingModes()
- Specified by:
getEffectiveSessionTrackingModes
in interfaceServletContext
-
getFilterRegistration
public FilterRegistration getFilterRegistration(String arg0)
- Specified by:
getFilterRegistration
in interfaceServletContext
-
getFilterRegistrations
public Map<String,? extends FilterRegistration> getFilterRegistrations()
- Specified by:
getFilterRegistrations
in interfaceServletContext
-
getJspConfigDescriptor
public JspConfigDescriptor getJspConfigDescriptor()
- Specified by:
getJspConfigDescriptor
in interfaceServletContext
-
getServletRegistration
public ServletRegistration getServletRegistration(String arg0)
- Specified by:
getServletRegistration
in interfaceServletContext
-
getServletRegistrations
public Map<String,? extends ServletRegistration> getServletRegistrations()
- Specified by:
getServletRegistrations
in interfaceServletContext
-
getSessionCookieConfig
public SessionCookieConfig getSessionCookieConfig()
- Specified by:
getSessionCookieConfig
in interfaceServletContext
-
setInitParameter
public boolean setInitParameter(String arg0, String arg1)
- Specified by:
setInitParameter
in interfaceServletContext
-
setSessionTrackingModes
public void setSessionTrackingModes(Set<SessionTrackingMode> arg0)
- Specified by:
setSessionTrackingModes
in interfaceServletContext
-
getVirtualServerName
public String getVirtualServerName()
- Specified by:
getVirtualServerName
in interfaceServletContext
-
setResponseCharacterEncoding
public void setResponseCharacterEncoding(String encoding)
- Specified by:
setResponseCharacterEncoding
in interfaceServletContext
-
getResponseCharacterEncoding
public String getResponseCharacterEncoding()
- Specified by:
getResponseCharacterEncoding
in interfaceServletContext
-
setRequestCharacterEncoding
public void setRequestCharacterEncoding(String encoding)
- Specified by:
setRequestCharacterEncoding
in interfaceServletContext
-
getRequestCharacterEncoding
public String getRequestCharacterEncoding()
- Specified by:
getRequestCharacterEncoding
in interfaceServletContext
-
setSessionTimeout
public void setSessionTimeout(int time)
- Specified by:
setSessionTimeout
in interfaceServletContext
-
getSessionTimeout
public int getSessionTimeout()
- Specified by:
getSessionTimeout
in interfaceServletContext
-
addJspFile
public ServletRegistration.Dynamic addJspFile(String a, String b)
- Specified by:
addJspFile
in interfaceServletContext
-
-