Class 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
  • Constructor Details

    • MonitorManager

      public MonitorManager()
  • Method Details

    • configure

      public void configure() throws ConfigurationException
      (re)configure all destinations and all monitors. Monitors will register all required eventNotificationListeners.
      Specified by:
      configure in interface ConfigurableLifecycle
      Throws:
      ConfigurationException - in case it was not able to configure the component.
    • getPhase

      public int getPhase()
      Specified by:
      getPhase in interface ConfigurableLifecycle
      Specified by:
      getPhase in interface org.springframework.context.Phased
      Specified by:
      getPhase in interface org.springframework.context.SmartLifecycle
    • addDestination

      public void addDestination(IMonitorDestination monitorAdapter)
    • getDestination

      public IMonitorDestination getDestination(String name)
    • getDestinations

      public Map<String,IMonitorDestination> getDestinations()
    • onApplicationEvent

      public void onApplicationEvent(RegisterMonitorEvent event)
      Specified by:
      onApplicationEvent in interface org.springframework.context.ApplicationListener<RegisterMonitorEvent>
    • addMonitor

      public void addMonitor(Monitor monitor)
    • removeMonitor

      public void removeMonitor(Monitor monitor)
    • getMonitor

      public Monitor getMonitor(int index)
    • findMonitor

      public Optional<Monitor> findMonitor(String name)
    • getMonitors

      public List<Monitor> getMonitors()
    • getEvents

      public Map<String,Event> getEvents()
    • toXml

      public XmlBuilder toXml()
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware