Kernel Extension allowing plugins to listen kernel events
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENSE
README.md
pom.xml

README.md

Kernel-listener Build status

KernelListener is a kernel extension allowing plugins to listen kernel events.

Integration

With Maven, add the following dependency to your pom.xml:

<dependency>
    <groupId>io.nuun</groupId>
    <artifactId>kernel-listener</artifactId>
    <version>???</version>
</dependency>

Where ??? is the current version of the extension.

Usage

To make your plugin aware of the kernel life cycle, do it implement the KernelListener interface.

public class MyExtendedPlugin extends AbstractPlugin implements KernelListener {

    @Override
    public String name() {
        return "my-extended-plugin";
    }

    @Override
    public void kernelInitializing() {
        ...
    }

    @Override
    public void kernelInitialized() {
        ...
    }

    @Override
    public void kernelStarting() {
        ...
    }

    @Override
    public void kernelStarted() {
        ...
    }

    @Override
    public void kernelStopping() {
        ...
    }

    @Override
    public void kernelStopped() {
        ...
    }
}