$darkmode
Elektra 0.9.12
|
Java representation of an Elektra plugin. More...
Public Member Functions | |
String | getName () |
int | open (KeySet config, Key errorKey) |
Calls the plugin's open function. More... | |
int | get (KeySet keySet, Key parentKey) throws KDBException |
Calls the plugin's get function. More... | |
int | set (KeySet keySet, Key parentKey) throws KDBException |
Calls the set function of the plugin. More... | |
int | error (KeySet keySet, Key parentKey) |
Calls the error function of the plugin. More... | |
int | close (Key parentKey) |
Calls the close function of the plugin. More... | |
Static Public Attributes | |
static final String | JNI_MODULE_CONTRACT_ROOT = "system:/elektra/modules/jni" |
This is the root key of the JNI plugin wrapping a Java plugin for use by Elektra. | |
static final String | PROCESS_CONTRACT_ROOT = "system:/elektra/modules/java" |
This is the root key of the process plugin wrapping a Java plugin for use by Elektra. | |
static final int | STATUS_ERROR = -1 |
Return value for plugin methods: An error occurred inside the plugin function. | |
static final int | STATUS_SUCCESS = 1 |
Return value for plugin methods: Everything went fine. | |
static final int | STATUS_NO_UPDATE = 0 |
Return value for plugin methods: Everything went fine and the function did not update the given key set / configuration. | |
Java representation of an Elektra plugin.
because of interface inheritance, it is required that all methods (open, get, set, error, close) are implemented, even if they are not supported. Whether or not a method is supported, must be defined via the correspoding exports/has
key of the contract. Any method that is not supported, should simply be implemented as throw new UnsupportedOperationException()
. If get isn't supported, you must still implement it and return the contract, when the parent key is below (or the same as) PROCESS_CONTRACT_ROOT. For other parent keys, you can safely throw UnsupportedOperationException.
int org.libelektra.Plugin.close | ( | Key | parentKey | ) |
Calls the close function of the plugin.
parentKey | a key |
Implemented in org.libelektra.NativePlugin.
Calls the error function of the plugin.
keySet | a keyset |
parentKey | a key |
int org.libelektra.Plugin.get | ( | KeySet | keySet, |
Key | parentKey | ||
) | throws KDBException |
Calls the plugin's get function.
keySet | Key set to store the retrieved keys in |
parentKey | Parent key for retrieval |
KDBException | if Elektra could not set the key set |
String org.libelektra.Plugin.getName | ( | ) |
Calls the plugin's open function.
config | Plugin configuration key set |
errorKey | Used to store warnings and error information |
Implemented in org.libelektra.NativePlugin.
int org.libelektra.Plugin.set | ( | KeySet | keySet, |
Key | parentKey | ||
) | throws KDBException |
Calls the set function of the plugin.
keySet | a keyset |
parentKey | a key |
KDBException | when Elektra could not set the keyset |
Implemented in org.libelektra.NativePlugin.