Package org.eclipse.sisu.bean
Class BeanScheduler
java.lang.Object
org.eclipse.sisu.bean.BeanScheduler
- Direct Known Subclasses:
LifecycleManager
,PlexusLifecycleManager
Schedules safe activation of beans even when cyclic dependencies are involved.
Takes advantage of the new Guice ProvisionListener SPI, if available at runtime.
Takes advantage of the new Guice ProvisionListener SPI, if available at runtime.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static final class
Listens to provisioning events in order to determine safe activation points.private final class
Collects pending beans waiting for activation. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final Object
(package private) static final Object
(package private) static final Object
static final com.google.inject.Module
Enables deferred activation of component cycles, only needed in legacy systems like Plexus.(package private) static final ThreadLocal<Object[]>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
Customized activation of the given bean.static void
detectCycle
(Object value) Detects if a dependency cycle exists and activation needs to be deferred.final void
Schedules activation of the given bean at the next safe activation point.
-
Field Details
-
CYCLE_ACTIVATOR
-
CANDIDATE_CYCLE
-
CYCLE_CONFIRMED
-
MODULE
public static final com.google.inject.Module MODULEEnables deferred activation of component cycles, only needed in legacy systems like Plexus. -
pendingHolder
-
-
Constructor Details
-
BeanScheduler
public BeanScheduler()
-
-
Method Details
-
detectCycle
Detects if a dependency cycle exists and activation needs to be deferred. -
schedule
Schedules activation of the given bean at the next safe activation point.- Parameters:
bean
- The managed bean
-
activate
Customized activation of the given bean.- Parameters:
bean
- The bean to activate
-