Class BeanScheduler

  • Direct Known Subclasses:
    LifecycleManager, PlexusLifecycleManager

    public abstract class BeanScheduler
    extends Object
    Schedules safe activation of beans even when cyclic dependencies are involved.
    Takes advantage of the new Guice ProvisionListener SPI, if available at runtime.
    • Field Detail

      • MODULE

        public static final com.google.inject.Module MODULE
        Enables deferred activation of component cycles, only needed in legacy systems like Plexus.
    • Constructor Detail

      • BeanScheduler

        public BeanScheduler()
    • Method Detail

      • detectCycle

        public static void detectCycle​(Object value)
        Detects if a dependency cycle exists and activation needs to be deferred.
      • schedule

        public final void schedule​(Object bean)
        Schedules activation of the given bean at the next safe activation point.
        Parameters:
        bean - The managed bean
      • activate

        protected abstract void activate​(Object bean)
        Customized activation of the given bean.
        Parameters:
        bean - The bean to activate