Package org.frankframework.monitoring
Class Monitor
java.lang.Object
org.frankframework.monitoring.Monitor
- All Implemented Interfaces:
FrankElement
,HasApplicationContext
,HasName
,IConfigurable
,IScopeProvider
,NameAware
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.DisposableBean
,org.springframework.context.ApplicationContextAware
@FrankDocGroup(MONITORING)
public class Monitor
extends Object
implements IConfigurable, NameAware, org.springframework.beans.factory.DisposableBean, FrankElement
Example configuration:
<Monitor name="Receiver Shutdown" destinations="MONITOR_LOG">
<AlarmTrigger severity="WARNING">
<Event>Receiver Shutdown</Event>
</AlarmTrigger>
<ClearingTrigger severity="WARNING">
<Event>Receiver Shutdown</Event>
</ClearingTrigger>
</Monitor>
- Since:
- 4.9
- Version:
- 2.0
- Author:
- Gerrit van Brakel, Niels Meijer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTrigger
(ITrigger trigger) void
changeMonitorState
(EventType eventType, Severity severity, String eventCode, MonitorEvent event) void
changeState
(boolean alarm, Severity severity, MonitorEvent event) protected void
clearEvents
(boolean alarm) void
Configure this component.void
destroy()
Destroy the monitor and all registered triggersint
org.springframework.context.ApplicationContext
This ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.getName()
getTrigger
(int index) getType()
boolean
isRaised()
void
removeTrigger
(ITrigger trigger) void
setAdditionalHitCount
(int i) void
setAlarmSeverity
(Severity alarmSeverity) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setDestinations
(String newDestinations) void
setDestinationSet
(Set<String> newDestinations) void
setManager
(MonitorManager manager) void
void
setRaised
(boolean b) void
toXml()
-
Constructor Details
-
Monitor
public Monitor()
-
-
Method Details
-
configure
Description copied from interface:IConfigurable
Configure this component.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
changeState
public void changeState(boolean alarm, Severity severity, MonitorEvent event) throws MonitorException - Throws:
MonitorException
-
changeMonitorState
public void changeMonitorState(EventType eventType, Severity severity, String eventCode, MonitorEvent event) throws MonitorException - Throws:
MonitorException
-
clearEvents
protected void clearEvents(boolean alarm) -
toXml
-
getDestinationsAsString
-
setDestinations
-
getDestinationSet
-
setDestinationSet
-
addTrigger
-
removeTrigger
-
getLogPrefix
-
setManager
-
getTriggers
-
getTrigger
-
setName
-
setRaised
public void setRaised(boolean b) -
isRaised
public boolean isRaised() -
setAdditionalHitCount
public void setAdditionalHitCount(int i) -
getAdditionalHitCount
public int getAdditionalHitCount() -
destroy
public void destroy()Destroy the monitor and all registered triggers- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
getConfigurationClassLoader
Description copied from interface:IScopeProvider
This ClassLoader is set upon creation of the object, used to retrieve resources configured by the Ibis application.- Specified by:
getConfigurationClassLoader
in interfaceHasApplicationContext
- Specified by:
getConfigurationClassLoader
in interfaceIScopeProvider
- Returns:
- returns the ClassLoader created by the
ClassLoaderManager
.
-
getName
-
getType
-
setType
-
getStateChanged
-
getLastHit
-
getAlarmSeverity
-
setAlarmSeverity
-
getRaisedBy
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()- Specified by:
getApplicationContext
in interfaceHasApplicationContext
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-