Elektra  0.9.6
Public Member Functions | List of all members
org.libelektra.NativePlugin Class Reference

This class can be used to load native Elektra plugins to be used by Java directly. More...

Inheritance diagram for org.libelektra.NativePlugin:
Inheritance graph
[legend]
Collaboration diagram for org.libelektra.NativePlugin:
Collaboration graph
[legend]

Public Member Functions

 NativePlugin (String pluginName, Key errorKey, KeySet modules) throws InstallationException
 Constructor for loading an Elektra plugin. More...
 
 NativePlugin (String pluginName, KeySet modules, KeySet config, Key errorKey)
 Constructor for loading an Elektra plugin. More...
 
KeySet getConfig ()
 Gets the config which was used to configure the plugin. More...
 
int open (KeySet conf, Key errorKey)
 Calls the plugin's open function. More...
 
int kdbOpen (Key errorKey)
 Opens the session with the KeyDatabase. More...
 
int close (Key errorKey)
 Closes the session with the Key database. More...
 
int set (KeySet keySet, Key errorKey) throws KDBException
 Lets the plugin transform the given KeySet. More...
 
- Public Member Functions inherited from org.libelektra.Plugin
String getName ()
 
int get (KeySet keySet, Key parentKey) throws KDBException
 Calls the plugin's get function. More...
 
int error (KeySet keySet, Key parentKey)
 Calls the error function of the plugin. More...
 

Additional Inherited Members

- Static Public Attributes inherited from org.libelektra.Plugin
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.
 

Detailed Description

This class can be used to load native Elektra plugins to be used by Java directly.

Constructor & Destructor Documentation

◆ NativePlugin() [1/2]

org.libelektra.NativePlugin.NativePlugin ( String  pluginName,
Key  errorKey,
KeySet  modules 
) throws InstallationException
inline

Constructor for loading an Elektra plugin.

Parameters
pluginNameThe plugin name
errorKeyThe errorKey
modulesTODO #3754 add parameter description
Exceptions
InstallationExceptionif the plugin does not exist
KeySetReleasedExceptionif
modules
has already been released
KeyReleasedExceptionif
errorKey
has already been released

◆ NativePlugin() [2/2]

org.libelektra.NativePlugin.NativePlugin ( String  pluginName,
KeySet  modules,
KeySet  config,
Key  errorKey 
)
inline

Constructor for loading an Elektra plugin.

Parameters
pluginNameThe plugin name
errorKeyThe errorKey
configTODO #3754 add parameter description and update other
modulesTODO #3754 add parameter description and update other
Exceptions
KeySetReleasedExceptionif
modules
or
config
has already been released
KeyReleasedExceptionif
errorKey
has already been released

Member Function Documentation

◆ close()

int org.libelektra.NativePlugin.close ( Key  errorKey)
inline

Closes the session with the Key database.

Parameters
errorKeymust be a valid key, e.g. created with Key.create()
Returns
0 if success or -1 otherwise

Implements org.libelektra.Plugin.

◆ getConfig()

KeySet org.libelektra.NativePlugin.getConfig ( )
inline

Gets the config which was used to configure the plugin.

Returns
A KeySet containing the configuration of the plugin

Implements org.libelektra.Plugin.

◆ kdbOpen()

int org.libelektra.NativePlugin.kdbOpen ( Key  errorKey)
inline

Opens the session with the KeyDatabase.

Parameters
errorKeymust be a valid key, e.g. created with Key.create()
Returns
0 if success or -1 otherwise
Exceptions
KeyReleasedExceptionif
errorKey
has already been released

◆ open()

int org.libelektra.NativePlugin.open ( KeySet  config,
Key  errorKey 
)
inline

Calls the plugin's open function.

Parameters
configPlugin configuration key set
errorKeyUsed to store warnings and error information
Returns
Plugin's return value for open
See also
STATUS_SUCCESS
STATUS_ERROR

Implements org.libelektra.Plugin.

◆ set()

int org.libelektra.NativePlugin.set ( KeySet  keySet,
Key  errorKey 
) throws KDBException
inline

Lets the plugin transform the given KeySet.

Parameters
keySetThe KeySet to transform
errorKeymust be a valid key, e.g. created with Key.create()
Returns
0 if success or -1 otherwise
Exceptions
KDBExceptionif return value was -1
KeySetReleasedExceptionif
keySet
has already been released
KeyReleasedExceptionif
errorKey
has already been released

Implements org.libelektra.Plugin.


The documentation for this class was generated from the following file: