Package org.frankframework.monitoring
Class Monitor
java.lang.Object
org.frankframework.monitoring.Monitor
- All Implemented Interfaces:
IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.DisposableBean
,org.springframework.context.ApplicationContextAware
@FrankDocGroup(MONITORING)
public class Monitor
extends Object
implements IConfigurable, org.springframework.beans.factory.DisposableBean
Example configuration:
<monitor name="Receiver Shutdown" destinations="MONITOR_LOG">
<trigger className="org.frankframework.monitoring.Alarm" severity="WARNING">
<event>Receiver Shutdown</event>
</trigger>
<trigger className="org.frankframework.monitoring.Clearing" severity="WARNING">
<event>Receiver Shutdown</event>
</trigger>
</monitor>
- Since:
- 4.9
- Version:
- 2.0
- Author:
- Gerrit van Brakel, Niels Meijer
-
Field Summary
-
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
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()
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
Monitor
public Monitor()
-
-
Method Details
-
configure
- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
-
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
- Specified by:
setName
in interfaceINamedObject
-
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 interfaceIScopeProvider
- Returns:
- returns the ClassLoader created by the
ClassLoaderManager
.
-
getName
- Specified by:
getName
in interfaceIConfigurationAware
- Specified by:
getName
in interfaceINamedObject
-
getType
-
setType
-
getStateChanged
-
getLastHit
-
getAlarmSeverity
-
setAlarmSeverity
-
getRaisedBy
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()- Specified by:
getApplicationContext
in interfaceIConfigurationAware
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-