public class Feature extends Module
A Feature represents an optional part of an application that adds new features and services.
A Feature only depends on Kernel code. A Feature is considered as unreliable code from Kernel point of view.
Instances of this class are owned by the Kernel.
|Modifier and Type||Class and Description|
A Feature state.
|Modifier and Type||Method and Description|
Gets a snapshot of all alive threads owned by this Feature (some threads included in the returned array may have been terminated when this method returns, some new threads may have been created when this method returns).
Returns the current Feature state.
Causes this Feature to start.
Causes this Feature to stop.
getExecutionCounter, getExecutionQuota, getName, getProvider, getUID, getVersion, setExecutionQuota
public Thread getAllAliveThreads()
public Feature.State getState()
public void start()
Feature.State.STARTEDstate and this method returns. Next steps are executed asynchronously within the new thread context:
public void stop()
ej.lang.Resource.reclaim()is called for each resource that remains open by the Feature.
DeadFeatureExceptionis thrown in threads that are running Feature code or in threads that want to call Feature code.
When the new Feature state is
Feature.State.INSTALLED, the Feature runtime has been fully reclaimed (threads and objects).
Otherwise, the new Feature state is
Feature.State.STOPPED and there are some remaining Feature objects references from Kernel.
This method can be called multiple times by the Kernel to reclaim objects again and thus to try to switch the Feature in the
When Feature state is set to
Feature.State.STOPPED, Kernel application shall remove all its references to objects owned by this Feature,
through the calls of