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.DynamicNested classes/interfaces inherited from interface jakarta.servlet.ServletRegistration
jakarta.servlet.ServletRegistration.Dynamic -
Method Summary
Modifier and TypeMethodDescriptionaddMapping(String... urlPatterns) intjakarta.servlet.MultipartConfigElementjakarta.servlet.ServletClass<? extends jakarta.servlet.Servlet>jakarta.servlet.ServletSecurityElementvoidsetLoadOnStartup(int loadOnStartup) voidsetMultipartConfig(jakarta.servlet.MultipartConfigElement multipartConfig) voidsetRunAsRole(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, setInitParametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.Registration
getClassName, getInitParameter, getInitParameters, getName, setInitParameter, setInitParametersMethods inherited from interface jakarta.servlet.Registration.Dynamic
setAsyncSupportedMethods inherited from interface jakarta.servlet.ServletConfig
getInitParameter, getInitParameterNames, getServletContext
-
Method Details
-
getServletName
- Specified by:
getServletNamein 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:
setLoadOnStartupin interfacejakarta.servlet.ServletRegistration.Dynamic
-
setServletSecurity
- Specified by:
setServletSecurityin interfacejakarta.servlet.ServletRegistration.Dynamic
-
setMultipartConfig
public void setMultipartConfig(jakarta.servlet.MultipartConfigElement multipartConfig) - Specified by:
setMultipartConfigin interfacejakarta.servlet.ServletRegistration.Dynamic
-
setRunAsRole
- Specified by:
setRunAsRolein interfacejakarta.servlet.ServletRegistration.Dynamic
-
addMapping
- Specified by:
addMappingin interfacejakarta.servlet.ServletRegistration
-
getMappings
- Specified by:
getMappingsin interfacejakarta.servlet.ServletRegistration
-
getRunAsRole
- Specified by:
getRunAsRolein interfacejakarta.servlet.ServletRegistration
-
getLoadOnStartup
public int getLoadOnStartup() -
getServletSecurity
public jakarta.servlet.ServletSecurityElement getServletSecurity() -
getMultipartConfig
public jakarta.servlet.MultipartConfigElement getMultipartConfig()
-