public abstract class AbstractMonitoringTask
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMonitoringTask.MonitoringMeasureType
The enumeration MonitoringMeasureType describes different types of
measures for cases where processes run into malfunction.
|
static class |
AbstractMonitoringTask.MonitoringState
The Enumeration MonitoringState.
|
static class |
AbstractMonitoringTask.MonitoringType
The enumeration allows to differentiate monitoring tasks.
|
Constructor and Description |
---|
AbstractMonitoringTask() |
Modifier and Type | Method and Description |
---|---|
AbstractMonitoringTask.MonitoringState |
doMonitoringTask()
Calls the actual monitoring task and returns the current
AbstractMonitoringTask.MonitoringState . |
int |
getCheckIntervalInSeconds()
Returns the check interval in seconds.
|
abstract java.lang.Runnable |
getFaultMeasure()
Should return a runnable that contains the suitable measure in case of a failure.
|
abstract AbstractMonitoringTask.MonitoringMeasureType |
getMonitoringMeasureType()
Returns the current
AbstractMonitoringTask.MonitoringMeasureType . |
AbstractMonitoringTask.MonitoringState |
getMonitoringState()
Returns the current monitoring state.
|
abstract AbstractMonitoringTask.MonitoringType |
getMonitoringType()
Returns the current
AbstractMonitoringTask.MonitoringType . |
abstract java.lang.String |
getTaskDescription()
Has to return a suitable task description.
|
abstract boolean |
isFaultlessProcess()
Do monitoring task.
|
void |
registerTask()
Registers at the local
LoadMeasureThread . |
abstract boolean |
removeTaskAfterMeasure()
Has to return true in case that the monitoring task can be removed after the failure measure was executed.
|
void |
setCheckIntervalInSeconds(java.lang.Integer newcheckIntervalInSeconds)
Sets the check interval in seconds.
|
protected void |
setMonitoringState(AbstractMonitoringTask.MonitoringState monitoringState)
Sets the current
AbstractMonitoringTask.MonitoringState . |
java.lang.String |
toString() |
void |
unregisterTask()
Removes the current monitoring task.
|
public abstract AbstractMonitoringTask.MonitoringType getMonitoringType()
AbstractMonitoringTask.MonitoringType
.public abstract AbstractMonitoringTask.MonitoringMeasureType getMonitoringMeasureType()
AbstractMonitoringTask.MonitoringMeasureType
.public abstract java.lang.String getTaskDescription()
public abstract boolean isFaultlessProcess()
public abstract java.lang.Runnable getFaultMeasure()
public abstract boolean removeTaskAfterMeasure()
public int getCheckIntervalInSeconds()
public void setCheckIntervalInSeconds(java.lang.Integer newcheckIntervalInSeconds)
null
or 0, the
default value of 5s will be taken.newcheckIntervalInSeconds
- the new check interval in secondspublic AbstractMonitoringTask.MonitoringState getMonitoringState()
protected void setMonitoringState(AbstractMonitoringTask.MonitoringState monitoringState)
AbstractMonitoringTask.MonitoringState
.monitoringState
- the new monitoring statepublic AbstractMonitoringTask.MonitoringState doMonitoringTask()
AbstractMonitoringTask.MonitoringState
.
In case of a malfunction, it tries to execute the defined measure.public java.lang.String toString()
toString
in class java.lang.Object
public void registerTask()
LoadMeasureThread
. Thus, the monitoring is active.public void unregisterTask()