Package org.frankframework.monitoring
Class MonitorManager
java.lang.Object
org.frankframework.lifecycle.AbstractConfigurableLifecyle
org.frankframework.monitoring.MonitorManager
- All Implemented Interfaces:
EventListener
,ConfigurableLifecycle
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.ApplicationListener<RegisterMonitorEvent>
,org.springframework.context.Lifecycle
,org.springframework.context.Phased
,org.springframework.context.SmartLifecycle
@FrankDocGroup(MONITORING)
public class MonitorManager
extends AbstractConfigurableLifecyle
implements org.springframework.context.ApplicationContextAware, org.springframework.context.ApplicationListener<RegisterMonitorEvent>
Manager for Monitoring.
Configure/start/stop lifecycles are managed by Spring.
- Version:
- 2.0
- Author:
- Niels Meijer
-
Field Summary
Fields inherited from class org.frankframework.lifecycle.AbstractConfigurableLifecyle
log
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDestination
(IMonitorDestination monitorAdapter) void
addMonitor
(Monitor monitor) void
(re)configure all destinations and all monitors.findMonitor
(String name) org.springframework.context.ApplicationContext
getDestination
(String name) getMonitor
(int index) int
getPhase()
void
void
removeMonitor
(Monitor monitor) void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
start()
void
stop()
toXml()
Methods inherited from class org.frankframework.lifecycle.AbstractConfigurableLifecyle
getState, inState, isRunning, updateState
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationListener
supportsAsyncExecution
Methods inherited from interface org.frankframework.lifecycle.ConfigurableLifecycle
isAutoStartup
Methods inherited from interface org.springframework.context.SmartLifecycle
stop
-
Constructor Details
-
MonitorManager
public MonitorManager()
-
-
Method Details
-
configure
(re)configure all destinations and all monitors. Monitors will register all required eventNotificationListeners.- Specified by:
configure
in interfaceConfigurableLifecycle
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
getPhase
public int getPhase()- Specified by:
getPhase
in interfaceConfigurableLifecycle
- Specified by:
getPhase
in interfaceorg.springframework.context.Phased
- Specified by:
getPhase
in interfaceorg.springframework.context.SmartLifecycle
-
addDestination
-
getDestination
-
getDestinations
-
onApplicationEvent
- Specified by:
onApplicationEvent
in interfaceorg.springframework.context.ApplicationListener<RegisterMonitorEvent>
-
addMonitor
-
removeMonitor
-
getMonitor
-
findMonitor
-
getMonitors
-
getEvents
-
toXml
-
start
public void start()- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
-