How To Use a FeatureEntryPoint class as my Application EntryPoint
An Application can require the use of advanced features, for example the FeatureEntryPoint.stop() method,
in order to communicate with a Kernel.
To use such features, you must create a class implementing the ej.kf.FeatureEntryPoint interface.
The creation of a Feature class is done as follows:
Create a new Application project, as described in Create a Project.
Add the KF module in the
dependenciesblock of thebuild.gradle.ktsfile of the project:
dependencies {
implementation("ej.api:kf:1.7.0")
}
Create the Java class of the Feature EntryPoint in the
src/main/javafolder, for example:
package com.mycompany;
import ej.kf.FeatureEntryPoint;
public class MyFeature implements FeatureEntryPoint {
@Override
public void start() {
System.out.println("Feature MyFeature started!");
}
@Override
public void stop() {
System.out.println("Feature MyFeature stopped!");
}
}
Define the property
applicationEntryPointin themicroejconfiguration block of thebuild.gradle.ktsfile. It must be set to the Full Qualified Name of the Feature class, for example:microej { applicationEntryPoint = "com.mycompany.MyFeature" }
