Class SmartSwitchingServlet
java.lang.Object
jakarta.servlet.GenericServlet
eu.rarogsoftware.rarog.platform.core.plugins.web.servlets.SmartSwitchingServlet
- All Implemented Interfaces:
FeatureModule<PluginServletMappingDescriptor>,jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
@AutoRegisterFeatureModuleComponent(PluginServletMappingDescriptor.class)
public class SmartSwitchingServlet
extends jakarta.servlet.GenericServlet
implements FeatureModule<PluginServletMappingDescriptor>
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final record -
Constructor Summary
ConstructorsConstructorDescriptionSmartSwitchingServlet(org.springframework.web.servlet.DispatcherServlet dispatcherServlet, org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties webMvcProperties, ApplicationSettings applicationSettings, org.springframework.web.util.UrlPathHelper urlPathHelper, MetricsService metricsService) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Optional<org.springframework.security.authorization.AuthorizationManager<org.springframework.security.web.access.intercept.RequestAuthorizationContext>>getServletsAuthorizationManager(jakarta.servlet.http.HttpServletRequest servletRequest) voidinit(jakarta.servlet.ServletConfig config) voidplugDescriptor(Plugin plugin, PluginServletMappingDescriptor descriptor) Registers new descriptor into module.voidservice(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res) shouldDisableCsrfProtection(jakarta.servlet.http.HttpServletRequest servletRequest) voidunplugDescriptor(Plugin plugin, PluginServletMappingDescriptor descriptor) Unregisters new descriptor into module.Methods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
SmartSwitchingServlet
public SmartSwitchingServlet(org.springframework.web.servlet.DispatcherServlet dispatcherServlet, org.springframework.boot.autoconfigure.web.servlet.WebMvcProperties webMvcProperties, ApplicationSettings applicationSettings, org.springframework.web.util.UrlPathHelper urlPathHelper, MetricsService metricsService)
-
-
Method Details
-
init
public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Servlet- Overrides:
initin classjakarta.servlet.GenericServlet- Throws:
jakarta.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Servlet- Overrides:
destroyin classjakarta.servlet.GenericServlet
-
service
public void service(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res) throws jakarta.servlet.ServletException, IOException - Specified by:
servicein interfacejakarta.servlet.Servlet- Specified by:
servicein classjakarta.servlet.GenericServlet- Throws:
jakarta.servlet.ServletExceptionIOException
-
plugDescriptor
Description copied from interface:FeatureModuleRegisters new descriptor into module. Module will use resources represented by descriptor to provide its functionality as long as descriptor is unplugged.- Specified by:
plugDescriptorin interfaceFeatureModule<PluginServletMappingDescriptor>- Parameters:
plugin- plugin that is parent of descriptordescriptor- feature descriptor to plug
-
unplugDescriptor
Description copied from interface:FeatureModuleUnregisters new descriptor into module. Module will no longer use resources provided by specified descriptor- Specified by:
unplugDescriptorin interfaceFeatureModule<PluginServletMappingDescriptor>- Parameters:
plugin- plugin that is parent of descriptordescriptor- feature descriptor to unplug
-
getServletsAuthorizationManager
public Optional<org.springframework.security.authorization.AuthorizationManager<org.springframework.security.web.access.intercept.RequestAuthorizationContext>> getServletsAuthorizationManager(jakarta.servlet.http.HttpServletRequest servletRequest) -
shouldDisableCsrfProtection
-