Package org.apache.struts2.dispatcher
Interface ContextAwareDestroyable
- All Superinterfaces:
InternalDestroyable
- All Known Implementing Classes:
FreemarkerCacheDestroyable
Extension of
InternalDestroyable for components that require
ServletContext during cleanup (e.g. clearing servlet-scoped caches).
<p>During Dispatcher.cleanup(), the discovery loop checks each
InternalDestroyable bean: if it implements this subinterface,
destroy(ServletContext) is called instead of destroy().</p>- Since:
- 7.2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddestroy()Default no-op —Dispatchercallsdestroy(ServletContext)instead when it recognises this type.voiddestroy(jakarta.servlet.ServletContext servletContext) Releases state that requires access to theServletContext.
-
Method Details
-
destroy
void destroy(jakarta.servlet.ServletContext servletContext) Releases state that requires access to theServletContext.- Parameters:
servletContext- the current servlet context, may benullif the Dispatcher was created without one
-
destroy
default void destroy()Default no-op —Dispatchercallsdestroy(ServletContext)instead when it recognises this type.- Specified by:
destroyin interfaceInternalDestroyable
-