Package com.helger.scope
Interface IScopeDestructionAware
-
- All Known Implementing Classes:
AbstractGlobalSingleton,AbstractRequestSingleton,AbstractSessionSingleton,AbstractSingleton,ScopeSessionManager
public interface IScopeDestructionAwareA listener interfaces that is invoked before a scope is destroyed. If an object implementing this interface is added into a scope, this destruction method is automatically called!- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidonBeforeScopeDestruction(IScope aScopeToBeDestroyed)Called before the owning scope is destroyed.default voidonScopeDestruction(IScope aScopeInDestruction)Called when the owning scope is destroyed.
-
-
-
Method Detail
-
onBeforeScopeDestruction
default void onBeforeScopeDestruction(@Nonnull IScope aScopeToBeDestroyed) throws Exception
Called before the owning scope is destroyed. You may perform some last actions before the scope is really destroyed. This method is called after theIScope.preDestroy()callback is invoked and before the scope is set as being "in destruction".- Parameters:
aScopeToBeDestroyed- The scope that will be destroyed. Nevernull.- Throws:
Exception- in case of an error
-
onScopeDestruction
default void onScopeDestruction(@Nonnull IScope aScopeInDestruction) throws Exception
Called when the owning scope is destroyed. You may perform some cleanup work in here. This is method is called when the scope is already "in destruction".- Parameters:
aScopeInDestruction- The scope in destruction. Nevernull.- Throws:
Exception- in case of an error
-
-