public abstract class ShutdownAwareScope extends java.lang.Object implements Scope
Scope
class for scopes that collect
destroyable beans and implement shutdown routine.Modifier and Type | Field and Description |
---|---|
protected java.util.List<BeanData> |
destroyableBeans |
Constructor and Description |
---|
ShutdownAwareScope() |
Modifier and Type | Method and Description |
---|---|
protected void |
destroyBean(BeanData beanData)
Removes destroyable bean from the list and calls it destroy methods.
|
protected boolean |
isBeanDestroyable(BeanData beanData)
Returns
true if bean is destroyable. |
protected void |
registerDestroyableBeans(BeanData beanData)
Checks if bean data is destroyable (has destroy methods) and
registers it for later
shutdown() . |
void |
shutdown()
Shutdowns the scope and calls all collected destroyable beans.
|
protected int |
totalRegisteredDestroyableBeans()
Returns number of destroyable beans that have been registered.
|
protected java.util.List<BeanData> destroyableBeans
protected boolean isBeanDestroyable(BeanData beanData)
true
if bean is destroyable.protected void registerDestroyableBeans(BeanData beanData)
shutdown()
.protected int totalRegisteredDestroyableBeans()
protected void destroyBean(BeanData beanData)
Copyright © 2003-present Jodd Team