sirius.kernel.Stoppable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sirius-kernel Show documentation
Show all versions of sirius-kernel Show documentation
Provides common core classes and the microkernel powering all Sirius applications
/*
* Made with all the love in the world
* by scireum in Remshalden, Germany
*
* Copyright by scireum GmbH
* http://www.scireum.de - [email protected]
*/
package sirius.kernel;
import sirius.kernel.di.std.Priorized;
/**
* Classes implementing this interface get notified once the framework is being shut down.
*
* The framework lifecycle is split into three phases:
*
* - {@link Startable}: Each startable component is invoked during startup.
* - {@link Stoppable}: Each stoppable component is invoked during framework shutdown.
* - {@link Killable}: The the shutdown process has to wait for a task to finish, this can be used to block until a
* task is completed.
*
*/
public interface Stoppable extends Priorized {
@Override
default int getPriority() {
return DEFAULT_PRIORITY;
}
/**
* Invoked when the framework shuts down.
*
* This method must not block (and wait for internals to stop). This can be done in
* {@link Killable#awaitTermination()}.
*/
void stopped();
}