Package org.eclipse.sisu.bean
Class LifecycleManager
java.lang.Object
org.eclipse.sisu.bean.BeanScheduler
org.eclipse.sisu.bean.LifecycleManager
- All Implemented Interfaces:
BeanManager
BeanManager that manages JSR250 beans and schedules lifecycle events.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceAllows testing if a class should be flushed from the cache -
Field Summary
Fields inherited from class org.eclipse.sisu.bean.BeanScheduler
MODULE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidCustomized activation of the given bean.voidFlush the cache for each key that satisfies the given predicatebooleanDecides whether instances of the given bean type should be reported to this manager.booleanAsks this manager to manage the given bean instance.manage(BeanProperty<?> property) Asks this manager to manage the given bean property.booleanunmanage()Asks this manager to unmanage all the bean instances it knows about.booleanAsks this manager to unmanage the given bean instance.Methods inherited from class org.eclipse.sisu.bean.BeanScheduler
detectCycle, schedule
-
Constructor Details
-
LifecycleManager
public LifecycleManager()
-
-
Method Details
-
manage
Description copied from interface:BeanManagerDecides whether instances of the given bean type should be reported to this manager.- Specified by:
managein interfaceBeanManager- Parameters:
clazz- The bean type- Returns:
trueif instances of the bean should be reported; otherwisefalse
-
manage
Description copied from interface:BeanManagerAsks this manager to manage the given bean property.- Specified by:
managein interfaceBeanManager- Parameters:
property- The bean property- Returns:
- Non-null binding if the bean property was managed; otherwise
null
-
manage
Description copied from interface:BeanManagerAsks this manager to manage the given bean instance.- Specified by:
managein interfaceBeanManager- Parameters:
bean- The bean instance- Returns:
trueif the bean instance was managed; otherwisefalse
-
unmanage
Description copied from interface:BeanManagerAsks this manager to unmanage the given bean instance.- Specified by:
unmanagein interfaceBeanManager- Parameters:
bean- The bean instance- Returns:
trueif the bean instance was unmanaged; otherwisefalse
-
unmanage
public boolean unmanage()Description copied from interface:BeanManagerAsks this manager to unmanage all the bean instances it knows about.- Specified by:
unmanagein interfaceBeanManager- Returns:
trueif any bean instances were unmanaged; otherwisefalse
-
activate
Description copied from class:BeanSchedulerCustomized activation of the given bean.- Specified by:
activatein classBeanScheduler- Parameters:
bean- The bean to activate
-
flushCacheFor
Flush the cache for each key that satisfies the given predicate- Parameters:
remove- a tester that can decide if this key needs to be flushed or not.- Since:
- 0.9.0.M3
-