Package com.foreach.across.test
Class MockServletRegistration
java.lang.Object
com.foreach.across.test.AbstractMockRegistration
com.foreach.across.test.MockServletRegistration
- All Implemented Interfaces:
jakarta.servlet.Registration
,jakarta.servlet.Registration.Dynamic
,jakarta.servlet.ServletConfig
,jakarta.servlet.ServletRegistration
,jakarta.servlet.ServletRegistration.Dynamic
public class MockServletRegistration
extends AbstractMockRegistration
implements jakarta.servlet.ServletRegistration.Dynamic, jakarta.servlet.ServletConfig
Mock version of a
ServletRegistration.Dynamic
that does nothing but keep a number
of configured properties. Support is limited and only intended in combination with MockAcrossServletContext
.- Author:
- Marc Vanbrabant, Arne Vandamme
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.servlet.Registration
jakarta.servlet.Registration.Dynamic
Nested classes/interfaces inherited from interface jakarta.servlet.ServletRegistration
jakarta.servlet.ServletRegistration.Dynamic
-
Method Summary
Modifier and TypeMethodDescriptionaddMapping
(String... urlPatterns) int
jakarta.servlet.MultipartConfigElement
jakarta.servlet.Servlet
Class<? extends jakarta.servlet.Servlet>
jakarta.servlet.ServletSecurityElement
void
setLoadOnStartup
(int loadOnStartup) void
setMultipartConfig
(jakarta.servlet.MultipartConfigElement multipartConfig) void
setRunAsRole
(String roleName) setServletSecurity
(jakarta.servlet.ServletSecurityElement servletSecurity) Methods inherited from class com.foreach.across.test.AbstractMockRegistration
getClassName, getInitParameter, getInitParameterNames, getInitParameters, getName, getServletContext, isAsyncSupported, setAsyncSupported, setInitParameter, setInitParameters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jakarta.servlet.Registration
getClassName, getInitParameter, getInitParameters, getName, setInitParameter, setInitParameters
Methods inherited from interface jakarta.servlet.Registration.Dynamic
setAsyncSupported
Methods inherited from interface jakarta.servlet.ServletConfig
getInitParameter, getInitParameterNames, getServletContext
-
Method Details
-
getServletName
- Specified by:
getServletName
in interfacejakarta.servlet.ServletConfig
- Returns:
- servlet name
-
getServlet
public jakarta.servlet.Servlet getServlet()- Returns:
- filter instance if configured
-
getServletClass
- Returns:
- filter class if configured
-
setLoadOnStartup
public void setLoadOnStartup(int loadOnStartup) - Specified by:
setLoadOnStartup
in interfacejakarta.servlet.ServletRegistration.Dynamic
-
setServletSecurity
- Specified by:
setServletSecurity
in interfacejakarta.servlet.ServletRegistration.Dynamic
-
setMultipartConfig
public void setMultipartConfig(jakarta.servlet.MultipartConfigElement multipartConfig) - Specified by:
setMultipartConfig
in interfacejakarta.servlet.ServletRegistration.Dynamic
-
setRunAsRole
- Specified by:
setRunAsRole
in interfacejakarta.servlet.ServletRegistration.Dynamic
-
addMapping
- Specified by:
addMapping
in interfacejakarta.servlet.ServletRegistration
-
getMappings
- Specified by:
getMappings
in interfacejakarta.servlet.ServletRegistration
-
getRunAsRole
- Specified by:
getRunAsRole
in interfacejakarta.servlet.ServletRegistration
-
getLoadOnStartup
public int getLoadOnStartup() -
getServletSecurity
public jakarta.servlet.ServletSecurityElement getServletSecurity() -
getMultipartConfig
public jakarta.servlet.MultipartConfigElement getMultipartConfig()
-