io.nuun.kernel.api.config
Interface KernelConfiguration


public interface KernelConfiguration

Kernel configuration is used as an helper object to instantiate a Nuun kernel.


Method Summary
 KernelConfiguration classpathScanMode(ClasspathScanMode mode)
          Sets the classpath scan mode.
 KernelConfiguration containerContext(Object containerContext)
          Sets the container context which will be passed to plugins.
 KernelConfiguration dependencyInjectionMode(DependencyInjectionMode mode)
          Sets the dependency injection mode.
 KernelConfiguration moduleValidation(ModuleValidation validation)
          Sets a ModuleValidation which will be used to assert UnitModule given by the plugins.
 KernelConfiguration param(String key, String value)
          Sets a key/value parameter.
 KernelConfiguration params(String... paramEntries)
          Sets parameters entries as a sequence of key value pairs.
 KernelConfiguration plugins(Class<? extends Plugin>... pluginsClass)
          Specifies the plugins to be used by the Nuun kernel.
 KernelConfiguration plugins(Plugin... plugins)
          Specifies the plugins to be used by the Nuun kernel.
 KernelConfiguration withoutSpiPluginsLoader()
          Disables the plugin scan via the service loader.
 KernelConfiguration withSpiPluginsLoader()
          Enables the plugin scan via the service loader.
 

Method Detail

param

KernelConfiguration param(String key,
                          String value)
Sets a key/value parameter.

Parameters:
key - the key
value - the value
Returns:
itself

params

KernelConfiguration params(String... paramEntries)
Sets parameters entries as a sequence of key value pairs.

Parameters:
paramEntries - parameters
Returns:
itself

containerContext

KernelConfiguration containerContext(Object containerContext)
Sets the container context which will be passed to plugins.

Parameters:
containerContext - the container context
Returns:
itself

plugins

KernelConfiguration plugins(Class<? extends Plugin>... pluginsClass)
Specifies the plugins to be used by the Nuun kernel.

Parameters:
pluginsClass - the plugin classes
Returns:
itself

plugins

KernelConfiguration plugins(Plugin... plugins)
Specifies the plugins to be used by the Nuun kernel.

Parameters:
plugins - the plugin instances
Returns:
itself

withoutSpiPluginsLoader

KernelConfiguration withoutSpiPluginsLoader()
Disables the plugin scan via the service loader.

This allows to only use the plugins explicitly specified in the kernel configuration.

Returns:
itself

withSpiPluginsLoader

KernelConfiguration withSpiPluginsLoader()
Enables the plugin scan via the service loader.

All the plugin declared in META-INF/services will use by the Nuun kernel.

Returns:
itself

dependencyInjectionMode

KernelConfiguration dependencyInjectionMode(DependencyInjectionMode mode)
Sets the dependency injection mode.

Parameters:
mode - the mode to use
Returns:
itself
See Also:
DependencyInjectionMode

classpathScanMode

KernelConfiguration classpathScanMode(ClasspathScanMode mode)
Sets the classpath scan mode.

Parameters:
mode - the mode to use
Returns:
itself
See Also:
ClasspathScanMode

moduleValidation

KernelConfiguration moduleValidation(ModuleValidation validation)
Sets a ModuleValidation which will be used to assert UnitModule given by the plugins.

Parameters:
validation - the module validation
Returns:
itself


Copyright © 2012-2015. All Rights Reserved.