Package com.techcognita.javachatx.plugin
Interface Plugin
- All Known Implementing Classes:
BasePlugin,EchoPlugin
public interface Plugin
Interface for plugins that extend the functionality of JavaChatX.
Plugins can add new capabilities, integrations, or processing features.
-
Method Summary
Modifier and TypeMethodDescriptionvoidconfigure(com.google.gson.JsonObject configuration) Configure the plugin with specific settings.com.google.gson.JsonObjectexecute(com.google.gson.JsonObject input) Execute the plugin's functionality with the provided input.getId()Get the unique identifier for this plugin.getName()Get the name of this plugin.booleanisReady()Check if the plugin is properly configured and ready to use.
-
Method Details
-
getId
String getId()Get the unique identifier for this plugin.- Returns:
- The plugin's unique ID
-
getName
String getName()Get the name of this plugin.- Returns:
- The plugin's name
-
execute
Execute the plugin's functionality with the provided input.- Parameters:
input- The input data as a JSON object- Returns:
- The result of the plugin's execution as a JSON object
- Throws:
PluginException- If there's an error executing the plugin
-
configure
void configure(com.google.gson.JsonObject configuration) Configure the plugin with specific settings.- Parameters:
configuration- The configuration parameters as a JSON object
-
isReady
boolean isReady()Check if the plugin is properly configured and ready to use.- Returns:
- true if the plugin is ready, false otherwise
-