Interface DynamicServlet
-
- All Superinterfaces:
javax.servlet.Servlet
- All Known Implementing Classes:
AristaFlowHTTPService
,Default404Servlet
,DemuxServlet
,DynamicServletWrapper
public interface DynamicServlet extends javax.servlet.Servlet
A servlet for dynamically deployment that will be notified of (un-)deployment.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description String
getServletName()
Gets the name of the servlet.void
servletDeployed(javax.servlet.ServletContext context, String urlPattern)
Deprecated.UseservletDeployed(ServletContext, Collection)
instead.default void
servletDeployed(javax.servlet.ServletContext context, Collection<String> urlPattern)
Notifies the servlet that it has been deployed with the designated context and the designated patterns.void
servletUndeployed(javax.servlet.ServletContext context)
Notifies the servlet that it has been undeployed.
-
-
-
Method Detail
-
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
@Deprecated void servletDeployed(javax.servlet.ServletContext context, String urlPattern)
Deprecated.UseservletDeployed(ServletContext, Collection)
instead.Notifies the servlet that it has been deployed with the designated context and the designated pattern. Note that the servlet usually will not have been initialised yet.- Parameters:
context
- The servlet context of this servlet.urlPattern
- The URL pattern (mapping) this servlet has been deployed with.
-
servletDeployed
default void servletDeployed(javax.servlet.ServletContext context, Collection<String> urlPattern)
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.urlPattern
- The URL patterns (mapping) this servlet has been deployed with.
-
servletUndeployed
void servletUndeployed(javax.servlet.ServletContext context)
Notifies the servlet that it has been undeployed.- Parameters:
context
- The servlet context of this servlet.
-
-