Interface DynamicServlet
- All Superinterfaces:
jakarta.servlet.Servlet
- All Known Implementing Classes:
AristaFlowHTTPService,Default404Servlet,DemuxServlet,DynamicServletWrapper,de.aristaflow.adept2.base.servlet.SimpleServingServlet,WebUiServlet
public interface DynamicServlet
extends jakarta.servlet.Servlet
A servlet for dynamically deployment that will be notified of (un-)deployment.
-
Method Summary
Modifier and TypeMethodDescriptionGets the name of the servlet.voidservletDeployed(jakarta.servlet.ServletContext context, Collection<String> urlPatterns) Notifies the servlet that it has been deployed with the designated context and the designated patterns.voidservletUndeployed(jakarta.servlet.ServletContext context) Notifies the servlet that it has been undeployed.Methods inherited from interface jakarta.servlet.Servlet
destroy, getServletConfig, getServletInfo, init, service
-
Method Details
-
getServletName
String getServletName()Gets the name of the servlet. Note that usually the servlet implementations rely on the servlet configuration to provide a name. However, when using aDynamicServlet, the servlet name has to be provided explicitly.- Returns:
- The name of the servlet.
-
servletDeployed
Notifies the servlet that it has been deployed with the designated context and the designated patterns. Note that the servlet usually will not have been initialised yet.- Parameters:
context- The servlet context of this servlet.urlPatterns- The URL patterns (mapping) this servlet has been deployed with.
-
servletUndeployed
void servletUndeployed(jakarta.servlet.ServletContext context) Notifies the servlet that it has been undeployed.- Parameters:
context- The servlet context of this servlet.
-