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 Type
    Method
    Description
    void
    configure(com.google.gson.JsonObject configuration)
    Configure the plugin with specific settings.
    com.google.gson.JsonObject
    execute(com.google.gson.JsonObject input)
    Execute the plugin's functionality with the provided input.
    Get the unique identifier for this plugin.
    Get the name of this plugin.
    boolean
    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

      com.google.gson.JsonObject execute(com.google.gson.JsonObject input) throws PluginException
      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