Elektra  0.9.4
Public Member Functions | List of all members
org.libelektra.plugin.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.plugin.NativePlugin:
Inheritance graph
[legend]
Collaboration diagram for org.libelektra.plugin.NativePlugin:
Collaboration graph
[legend]

Public Member Functions

 NativePlugin (String pluginName, Key errorKey, KeySet modules) throws InstallationException
 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 open function of the plugin. 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...
 
int get (KeySet keySet, Key errorKey) throws KDBException
 Writes into the given KeySet in the parameter. More...
 
int error (KeySet keySet, Key errorKey)
 Called in case an error happened. More...
 
String getName ()
 Returns the plugin name. More...
 

Detailed Description

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

Constructor & Destructor Documentation

◆ NativePlugin()

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

Constructor for loading an elektra plugin.

Parameters
pluginNameThe plugin name
errorKeyThe errorKey
Exceptions
InstallationExceptionif the plugin does not exist

Member Function Documentation

◆ close()

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

Closes the session with the Key database.

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

Implements org.libelektra.Plugin.

◆ error()

int org.libelektra.plugin.NativePlugin.error ( KeySet  keySet,
Key  errorKey 
)
inline

Called in case an error happened.

Parameters
keySetThe affected KeySet
errorKeyust be a valid key, e.g. created with Key.create() and contains error information
Return values
0if success or -1 otherwise

Implements org.libelektra.Plugin.

◆ get()

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

Writes into the given KeySet in the parameter.

Parameters
keySetThe KeySet you want returned
errorKeymust be a valid key, e.g. created with Key.create()
Return values
0if success or -1 otherwise
Exceptions
KDBExceptionif return value was -1

Implements org.libelektra.Plugin.

◆ getConfig()

KeySet org.libelektra.plugin.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.

◆ getName()

String org.libelektra.plugin.NativePlugin.getName ( )
inline

Returns the plugin name.

Returns
plugin name

Implements org.libelektra.Plugin.

◆ kdbOpen()

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

Opens the session with the KeyDatabase.

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

◆ open()

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

Calls the open function of the plugin.

Parameters
confa configuration keyset
errorKeya key
Returns
the plugin's return value for open

Implements org.libelektra.Plugin.

◆ set()

int org.libelektra.plugin.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()
Return values
0if success or -1 otherwise
Exceptions
KDBExceptionif return value was -1

Implements org.libelektra.Plugin.


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