Class EchoPlugin

java.lang.Object
com.techcognita.javachatx.plugin.BasePlugin
com.techcognita.javachatx.plugin.EchoPlugin
All Implemented Interfaces:
Plugin

public class EchoPlugin extends BasePlugin
A simple echo plugin for demonstration purposes. This plugin simply echoes back the input as the output.
  • Constructor Details

    • EchoPlugin

      public EchoPlugin(String id)
  • Method Details

    • execute

      public com.google.gson.JsonObject execute(com.google.gson.JsonObject input) throws PluginException
      Description copied from interface: Plugin
      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

      public void configure(com.google.gson.JsonObject configuration)
      Description copied from interface: Plugin
      Configure the plugin with specific settings.
      Specified by:
      configure in interface Plugin
      Overrides:
      configure in class BasePlugin
      Parameters:
      configuration - The configuration parameters as a JSON object