io.nuun.kernel.spi
Interface KernelExtension<T>

Type Parameters:
T - the kernel extension marker to be implemented by plugins.

public interface KernelExtension<T>

Kernel extensions provide an SPI to enhanced the kernel behavior.

To create a kernel extension, create a class which implements the KernelExtension interface. And a marker interface associated to the extension as follows:

 class MyFeatureExtension implements KernelExtension<MyFeature> {...}

 interface MyFeature {...}
 

Then, create a plugin implementing the extension marker.

 class MyPlugin extends AbstractPlugin implements MyFeature {...}
 

The kernel extension will be called at each step of the kernel lifecycle (initializing, initialized, starting, etc.). The list of plugin implementing the kernel extension marker will be passed to the kernel extension at each method call.

Author:
Pierre Thirouin

Method Summary
 void initialized(Collection<T> extendedPlugins)
          Notifies the given extension that the kernel is initialized.
 void initializing(Collection<T> extendedPlugins)
          Notifies the given extension that the kernel is initializing.
 void started(Collection<T> extendedPlugins)
          Notifies the given extension that the kernel is started.
 void starting(Collection<T> extendedPlugins)
          Notifies the given extension that the kernel is starting.
 void stopped(Collection<T> extendedPlugins)
          Notifies the given extension that the kernel is stopped.
 void stopping(Collection<T> extendedPlugins)
          Notifies the given extension that the kernel is stopping.
 

Method Detail

initializing

void initializing(Collection<T> extendedPlugins)
Notifies the given extension that the kernel is initializing.

Parameters:
extendedPlugins - the plugin to notify

initialized

void initialized(Collection<T> extendedPlugins)
Notifies the given extension that the kernel is initialized.

Parameters:
extendedPlugins - the plugin to notify

starting

void starting(Collection<T> extendedPlugins)
Notifies the given extension that the kernel is starting.

Parameters:
extendedPlugins - the plugin to notify

started

void started(Collection<T> extendedPlugins)
Notifies the given extension that the kernel is started.

Parameters:
extendedPlugins - the plugin to notify

stopping

void stopping(Collection<T> extendedPlugins)
Notifies the given extension that the kernel is stopping.

Parameters:
extendedPlugins - the plugin to notify

stopped

void stopped(Collection<T> extendedPlugins)
Notifies the given extension that the kernel is stopped.

Parameters:
extendedPlugins - the plugin to notify


Copyright © 2012-2015. All Rights Reserved.