KF
Definitions
Feature Definition Files
A Feature is a group of types, resources and [BON] immutables objects defined using two files that shall be in Application classpath:
[featureName].kf
, a Java properties file. Keys are described in the “Feature definition file properties” table below.[featureName].cert
, an X509 certificate file that uniquely identifies the Feature
Key |
Usage |
Description |
---|---|---|
entryPoint |
Mandatory |
The fully qualified name of the class that implements ej.kf.FeatureEntryPoint |
immutables |
Optional |
Semicolon separated list of paths to [BON] immutable files owned by the Feature. |
resources |
Optional |
Semicolon separated list of resource names owned by the Feature. Resource name is defined by Class.getResourceAsStream(String) |
requiredTypes |
Optional |
Comma separated list of fully qualified names of required types. (Types that may be dynamically loaded using Class.forName()). |
types |
Optional |
Comma separated list of fully qualified names of types owned by the Feature. A wildcard is allowed as terminal character to embed all types starting with the given qualified name ( |
version |
Mandatory |
String version, that can retrieved using ej.kf.Module.getVersion() |
Kernel Definition Files
Kernel definition files are mandatory if one or more Feature definition
file is loaded and are named kernel.kf
and kernel.cert
.
kernel.kf
must only define the version
key. All types, resources
and immutables are automatically owned by the Kernel if not explicitly
set to be owned by a Feature.
Kernel API Files
Kernel API file definition is explained here: Kernel API.
Access Error Codes
When an instruction is executed that will break a [KF] specification insulation
semantic rule, a java.lang.IllegalAccessError is thrown, with an
error code composed of two parts: [source][errorKind]
.
source
: a single character indicating the kind of Java element on which the access error occurred (Table “Error codes: source”)errorKind
: an error number indicating the action on which the access error occurred (Table “Error codes: kind”)
Character |
Description |
---|---|
A |
Error thrown when accessing an array |
I |
Error thrown when calling a method |
F |
Error thrown when accessing an instance field |
M |
Error thrown when entering a synchronized block or method |
P |
Error thrown when passing a parameter to a method call |
R |
Error thrown when returning from a method call |
S |
Error thrown when accessing a static field |
Id |
Description |
---|---|
1 |
An object owned by a Feature is being assigned to an object owned by the Kernel, but the current context is not owned by the Kernel |
2 |
An object owned by a Feature is being assigned to an object owned by another Feature |
3 |
An object owned by a Feature is being accessed from a context owned by another Feature |
4 |
A synchronize on an object owned by the Kernel is executed in a method owned by a Feature |
5 |
A call to a feature code occurs while owning a Kernel monitor |
Feature Installation and Loading Error Codes
When an error occurs during the installation of a Feature via the Kernel.install(InputStream) method, or during the loading of installed Features at bootstrap, the system may throw an ej.kf.InvalidFormatException.
This exception carries a specific error code, which can be retrieved by calling the getMessage() method
on the InvalidFormatException instance.
The returned message will follow the format: code=<id>
, where id
corresponds the specific error encountered.
Error codes ranging from 150
to 180
, thrown during Feature installation, typically indicate an invalid or corrupted Feature file.
This corruption may occur during the file transfer process.
Other possible causes for this exception include errors returned by the LLKERNEL abstraction layer, or issues with a stored Feature, such as corruption or incompatibility.
Id |
Description |
---|---|
51 |
The |
52 |
The maximum number of installed Features is reached. |
54 |
The address returned by the last call to
|
55 |
The address returned by the last call to
|
56 |
The address returned by the last call to
|
58 |
The |
59 |
The |
Id |
Description |
---|---|
53 |
The installed Feature content has been corrupted (CRC check error). |
57 |
The address returned by the last call to
|
60 |
The |