Interface IScopeDestructionAware

    • 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 the IScope.preDestroy() callback is invoked and before the scope is set as being "in destruction".
        Parameters:
        aScopeToBeDestroyed - The scope that will be destroyed. Never null.
        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. Never null.
        Throws:
        Exception - in case of an error