Class Trigger
- java.lang.Object
-
- nl.nn.adapterframework.monitoring.Trigger
-
- All Implemented Interfaces:
EventListener
,LazyLoadingEventListener<FireMonitorEvent>
,ITrigger
,org.springframework.beans.factory.DisposableBean
,org.springframework.context.ApplicationListener<FireMonitorEvent>
public class Trigger extends Object implements ITrigger
A Trigger that has its type configured at startup. Either use type = ALARM or type = CLEARING.- Since:
- 4.9
- Author:
- Gerrit van Brakel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface nl.nn.adapterframework.monitoring.ITrigger
ITrigger.TriggerType
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Logger
log
-
Constructor Summary
Constructors Constructor Description Trigger()
-
Method Summary
-
-
-
Method Detail
-
configure
public void configure() throws ConfigurationException
- Specified by:
configure
in interfaceITrigger
- Throws:
ConfigurationException
-
isConfigured
public boolean isConfigured()
- Specified by:
isConfigured
in interfaceITrigger
-
onApplicationEvent
public void onApplicationEvent(FireMonitorEvent event)
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<FireMonitorEvent>
-
evaluateEvent
protected void evaluateEvent(FireMonitorEvent event)
-
evaluateAdapterFilters
protected boolean evaluateAdapterFilters(EventThrowing source)
-
changeState
protected void changeState(FireMonitorEvent event) throws MonitorException
- Throws:
MonitorException
-
clearEvents
public void clearEvents()
- Specified by:
clearEvents
in interfaceITrigger
-
cleanUpEvents
protected void cleanUpEvents(Instant now)
-
toXml
public void toXml(XmlBuilder monitor)
-
setMonitor
public void setMonitor(Monitor monitor)
- Specified by:
setMonitor
in interfaceITrigger
-
addEventCode
public void addEventCode(String code)
-
setEventCode
public void setEventCode(String code)
-
setEventCodes
public void setEventCodes(List<String> events)
- Specified by:
setEventCodes
in interfaceITrigger
-
getEventCodes
public List<String> getEventCodes()
- Specified by:
getEventCodes
in interfaceITrigger
-
setThreshold
public void setThreshold(int i)
- Specified by:
setThreshold
in interfaceITrigger
-
getAdapterFilters
public Map<String,AdapterFilter> getAdapterFilters()
- Specified by:
getAdapterFilters
in interfaceITrigger
-
clearAdapterFilters
public void clearAdapterFilters()
- Specified by:
clearAdapterFilters
in interfaceITrigger
-
registerAdapterFilter
public void registerAdapterFilter(AdapterFilter af)
- Specified by:
registerAdapterFilter
in interfaceITrigger
-
isFilterOnLowerLevelObjects
public boolean isFilterOnLowerLevelObjects()
-
isFilterOnAdapters
public boolean isFilterOnAdapters()
-
destroy
public void destroy() throws Exception
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
getMonitor
public Monitor getMonitor()
-
getSeverity
public Severity getSeverity()
- Specified by:
getSeverity
in interfaceITrigger
-
setSeverity
public void setSeverity(Severity severity)
- Specified by:
setSeverity
in interfaceITrigger
-
getSourceFiltering
public SourceFiltering getSourceFiltering()
- Specified by:
getSourceFiltering
in interfaceITrigger
-
setSourceFiltering
public void setSourceFiltering(SourceFiltering sourceFiltering)
- Specified by:
setSourceFiltering
in interfaceITrigger
-
getTriggerType
public ITrigger.TriggerType getTriggerType()
- Specified by:
getTriggerType
in interfaceITrigger
-
setTriggerType
public void setTriggerType(ITrigger.TriggerType triggerType)
- Specified by:
setTriggerType
in interfaceITrigger
-
getThreshold
public int getThreshold()
- Specified by:
getThreshold
in interfaceITrigger
-
-