Package org.eclipse.sisu.bean
Class BeanScheduler
- java.lang.Object
-
- org.eclipse.sisu.bean.BeanScheduler
-
- Direct Known Subclasses:
LifecycleManager
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 Summary
Fields Modifier and Type Field Description static com.google.inject.ModuleMODULEEnables deferred activation of component cycles, only needed in legacy systems like Plexus.
-
Constructor Summary
Constructors Constructor Description BeanScheduler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidactivate(Object bean)Customized activation of the given bean.static voiddetectCycle(Object value)Detects if a dependency cycle exists and activation needs to be deferred.voidschedule(Object bean)Schedules activation of the given bean at the next safe activation point.
-
-
-
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
-
-