Class AbstractMonitoringLifecycleStrategy

    • Constructor Detail

      • AbstractMonitoringLifecycleStrategy

        public AbstractMonitoringLifecycleStrategy​(ComponentMonitor monitor)
        Construct a AbstractMonitoringLifecycleStrategy.
        Parameters:
        monitor - the componentMonitor to use
        Throws:
        java.lang.NullPointerException - if the monitor is null
    • Method Detail

      • changeMonitor

        public void changeMonitor​(ComponentMonitor monitor)
        Swaps the current monitor with a replacement.
        Specified by:
        changeMonitor in interface ComponentMonitorStrategy
        Parameters:
        monitor - The new monitor.
        Throws:
        java.lang.NullPointerException - if the passed in monitor is null.
      • isLazy

        public boolean isLazy​(ComponentAdapter<?> adapter)
        Description copied from interface: LifecycleStrategy
        Is a component eager (not lazy) in that it should start when start() or equivalent is called, or lazy (it will only start on first getComponent() ). The default is the first of those two.
        Specified by:
        isLazy in interface LifecycleStrategy
        Returns:
        true if lazy, false if not lazy