Package kieker.monitoring.probe.servlet
Class AbstractRegularSamplingServletContextListener
java.lang.Object
kieker.monitoring.probe.servlet.AbstractRegularSamplingServletContextListener
- All Implemented Interfaces:
java.util.EventListener
,javax.servlet.ServletContextListener
- Direct Known Subclasses:
ClassLoadingServletContextListener
,CompilationServletContextListener
,CPUMemUsageServletContextListener
,CPUsCombinedServletContextListener
,GCServletContextListener
,JVMMemoryServletContextListener
,JVMUptimeServletContextListener
,SystemResourceUsageServletContextListener
,ThreadStatusServletContextListener
public abstract class AbstractRegularSamplingServletContextListener
extends java.lang.Object
implements javax.servlet.ServletContextListener
- Since:
- 1.10
- Author:
- Nils Christian Ehmke, Andre van Hoorn
-
Field Summary
Fields Modifier and Type Field Description static long
DEFAULT_SENSOR_INITIAL_DELAY_SECONDS
static long
DEFAULT_SENSOR_INTERVAL_SECONDS
-
Constructor Summary
Constructors Constructor Description AbstractRegularSamplingServletContextListener()
Empty default constructor. -
Method Summary
Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent event)
void
contextInitialized(javax.servlet.ServletContextEvent event)
protected abstract ISampler[]
createSamplers()
Create samplers for the specific sampling class.protected abstract java.lang.String
getContextParameterNameSamplingDelaySeconds()
Parameter name for the sampling delay to be used in the web.xml file.protected abstract java.lang.String
getContextParameterNameSamplingIntervalSeconds()
Parameter name for the sampling interval to be used in the web.xml file.
-
Field Details
-
DEFAULT_SENSOR_INTERVAL_SECONDS
public static final long DEFAULT_SENSOR_INTERVAL_SECONDS- See Also:
- Constant Field Values
-
DEFAULT_SENSOR_INITIAL_DELAY_SECONDS
public static final long DEFAULT_SENSOR_INITIAL_DELAY_SECONDS- See Also:
- Constant Field Values
-
-
Constructor Details
-
AbstractRegularSamplingServletContextListener
public AbstractRegularSamplingServletContextListener()Empty default constructor.
-
-
Method Details
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
-
getContextParameterNameSamplingIntervalSeconds
protected abstract java.lang.String getContextParameterNameSamplingIntervalSeconds()Parameter name for the sampling interval to be used in the web.xml file.- Returns:
- the parameter name
-
getContextParameterNameSamplingDelaySeconds
protected abstract java.lang.String getContextParameterNameSamplingDelaySeconds()Parameter name for the sampling delay to be used in the web.xml file.- Returns:
- the parameter name
-
createSamplers
Create samplers for the specific sampling class.- Returns:
- array of samplers
-