io.nuun.kernel.api
Interface Kernel


public interface Kernel

The Kernel is the main component of the I.O.C. technical stack.

Author:
epo.jemba@kametic.com

Field Summary
static String KERNEL_PREFIX_NAME
           
static String NUUN_CP_PATH_PREFIX
           
static String NUUN_CP_STRATEGY_ADD
           
static String NUUN_CP_STRATEGY_NAME
           
static String NUUN_NUM_CP_PATH
           
static String NUUN_ROOT_PACKAGE
           
 
Method Summary
 GlobalModule globalModule()
          After the kernel is initialized, if necessary, one can ask for the global Module the result of all plugins UnitModule aggregation.
 void init()
          Tell the kernel to initialize.
 boolean isInitialized()
          Indication on whether or not the kernel is initialized.
 boolean isStarted()
          Indication on whether or not the kernel is started.
 String name()
          The name of the kernel is determined with its
 UnitModule nonGuiceOverridingUnitModule(Class<? extends Plugin> plugin)
          After the kernel is initialized, one can ask for the particular Overriding UnitModule created by one plugin.
 UnitModule nonGuiceUnitModule(Class<? extends Plugin> plugin)
          After the kernel is initialized, one can ask for the particular UnitModule created by one plugin.
 ObjectGraph objectGraph()
          After the kernel is started, one can ask the ObjectGraph generated from the global module itself generated by all the modules the plugins create.
 UnitModule overridingUnitModule(Class<? extends Plugin> plugin)
          After the kernel is initialized, one can ask for the particular Overriding UnitModule created by one plugin.
 List<Plugin> plugins()
          After the kernel is initialized, if necessary, one can ask for the list of the plugins.
 void start()
          Tell the kernel to start.
 void stop()
          This methods will stop all the plugins in the reverse order of the started plugins.
 UnitModule unitModule(Class<? extends Plugin> plugin)
          After the kernel is initialized, one can ask for the particular UnitModule created by one plugin.
 

Field Detail

NUUN_ROOT_PACKAGE

static final String NUUN_ROOT_PACKAGE
See Also:
Constant Field Values

NUUN_NUM_CP_PATH

static final String NUUN_NUM_CP_PATH
See Also:
Constant Field Values

NUUN_CP_PATH_PREFIX

static final String NUUN_CP_PATH_PREFIX
See Also:
Constant Field Values

NUUN_CP_STRATEGY_NAME

static final String NUUN_CP_STRATEGY_NAME
See Also:
Constant Field Values

NUUN_CP_STRATEGY_ADD

static final String NUUN_CP_STRATEGY_ADD
See Also:
Constant Field Values

KERNEL_PREFIX_NAME

static final String KERNEL_PREFIX_NAME
See Also:
Constant Field Values
Method Detail

name

String name()
The name of the kernel is determined with its

Returns:
the name of the Kernel.

init

void init()
Tell the kernel to initialize. The kernel will load all the plugins and initialize them.

Plugins will the create an intermediate UnitModule.


isInitialized

boolean isInitialized()
Indication on whether or not the kernel is initialized.

Returns:
true if the kernel is initialized.

plugins

List<Plugin> plugins()
After the kernel is initialized, if necessary, one can ask for the list of the plugins.

This will rarely be the case. We advise developers to be careful with plugins.

Returns:
the list of plugins initialized.

unitModule

UnitModule unitModule(Class<? extends Plugin> plugin)
After the kernel is initialized, one can ask for the particular UnitModule created by one plugin.

This will rarely be the case. We advise developers to be careful with plugins.

Parameters:
plugin - this is the plugin from which we want the UnitModule.
Returns:
the unitModule

overridingUnitModule

UnitModule overridingUnitModule(Class<? extends Plugin> plugin)
After the kernel is initialized, one can ask for the particular Overriding UnitModule created by one plugin.

This will rarely be the case. We advise developers to be careful with plugins.

Parameters:
plugin - this is the plugin from which we want the UnitModule.
Returns:
the unitModule

nonGuiceUnitModule

UnitModule nonGuiceUnitModule(Class<? extends Plugin> plugin)
After the kernel is initialized, one can ask for the particular UnitModule created by one plugin.

Some times the plugin can return a native module that is not a Guice Module (the internal used D.I. engine).

Non Guice Module are handled via DependencyInjectionProvider.

This will rarely be the case. We advise developers to be careful with plugins.

Parameters:
plugin - this is the plugin from which we want the UnitModule.
Returns:
the unitModule

nonGuiceOverridingUnitModule

UnitModule nonGuiceOverridingUnitModule(Class<? extends Plugin> plugin)
After the kernel is initialized, one can ask for the particular Overriding UnitModule created by one plugin.

Some time the plugin can return a native module that is not a Guice Module (the internal used D.I. engine).

Non Guice Module are handled via DependencyInjectionProvider.

This will rarely be the case. We advise developers to be careful with plugins.

Parameters:
plugin - this is the plugin from which we want the UnitModule.
Returns:
the unitModule

globalModule

GlobalModule globalModule()
After the kernel is initialized, if necessary, one can ask for the global Module the result of all plugins UnitModule aggregation.

This will rarely be the case. We advise developers to be careful with plugins.

Returns:
the global binding definition provider for all the application.

start

void start()
Tell the kernel to start. Then the kernel will create the ObjectGraph of the application. The ObjectGraph will wrap the actual Guice injector.

The injector is created by combining nominal global modules and global modules to override.


isStarted

boolean isStarted()
Indication on whether or not the kernel is started.

Returns:
true if the kernel is started.

objectGraph

ObjectGraph objectGraph()
After the kernel is started, one can ask the ObjectGraph generated from the global module itself generated by all the modules the plugins create.

Returns:
the ObjectGraph

stop

void stop()
This methods will stop all the plugins in the reverse order of the started plugins.



Copyright © 2012-2015. All Rights Reserved.