Package org.frankframework.monitoring
Class Trigger
java.lang.Object
org.frankframework.monitoring.Trigger
- All Implemented Interfaces:
EventListener,IConfigurable,LazyLoadingEventListener<FireMonitorEvent>,ITrigger,org.springframework.beans.factory.Aware,org.springframework.beans.factory.DisposableBean,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<FireMonitorEvent>
public class Trigger
extends Object
implements ITrigger, org.springframework.context.ApplicationContextAware
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 org.frankframework.monitoring.ITrigger
ITrigger.TriggerType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidaddEventCodeText(String code) Adds one or more events to the trigger.protected voidchangeState(FireMonitorEvent event) protected voidcleanUpEvents(Instant now) voidvoidvoidConfigure this component.voiddestroy()protected booleanevaluateAdapterFilters(EventThrowing source) protected voidevaluateEvent(FireMonitorEvent event) booleanbooleanbooleanvoidvoidsetEventCode(String code) voidsetEventCodes(List<String> events) voidsetMonitor(Monitor monitor) voidsetPeriod(int i) Amount of hits required within 'x' amount of seconds before it counts as a triggervoidsetThreshold(int i) Amount of triggers required before sounding an alarmvoidtoXml(XmlBuilder monitor) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecutionMethods inherited from interface org.frankframework.monitoring.ITrigger
getPeriod, getSeverity, getSourceFiltering, getThreshold, getTriggerType, setSeverity, setSourceFiltering, setTriggerType
-
Constructor Details
-
Trigger
public Trigger()
-
-
Method Details
-
configure
Description copied from interface:IConfigurableConfigure this component.configure()is called once at startup of the framework in the configure method of the owner of thisIConfigurable. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure(), to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configurein interfaceIConfigurable- Throws:
ConfigurationException- in case it was not able to configure the component.
-
isConfigured
public boolean isConfigured()- Specified by:
isConfiguredin interfaceITrigger
-
onApplicationEvent
- Specified by:
onApplicationEventin interfaceorg.springframework.context.ApplicationListener<FireMonitorEvent>
-
evaluateEvent
-
evaluateAdapterFilters
-
changeState
- Throws:
MonitorException
-
clearEvents
public void clearEvents()- Specified by:
clearEventsin interfaceITrigger
-
cleanUpEvents
-
toXml
-
setMonitor
- Specified by:
setMonitorin interfaceITrigger
-
addEventCodeText
Adds one or more events to the trigger. Example:Pipe Exception . Each event requires it's own xml tag. It is not a comma-separated field. -
setEventCode
-
setEventCodes
- Specified by:
setEventCodesin interfaceITrigger
-
getEventCodes
- Specified by:
getEventCodesin interfaceITrigger
-
setThreshold
public void setThreshold(int i) Amount of triggers required before sounding an alarm- Specified by:
setThresholdin interfaceITrigger
-
setPeriod
public void setPeriod(int i) Amount of hits required within 'x' amount of seconds before it counts as a trigger -
getAdapterFilters
- Specified by:
getAdapterFiltersin interfaceITrigger
-
clearAdapterFilters
public void clearAdapterFilters()- Specified by:
clearAdapterFiltersin interfaceITrigger
-
isFilterOnLowerLevelObjects
public boolean isFilterOnLowerLevelObjects() -
addAdapterFilter
- Specified by:
addAdapterFilterin interfaceITrigger
-
isFilterOnAdapters
public boolean isFilterOnAdapters() -
destroy
- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-