Class BasePlugin

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

public abstract class BasePlugin extends Object implements Plugin
Base implementation of the Plugin interface. Provides common functionality for all plugins in the JavaChatX framework.
  • Field Details

    • id

      protected String id
    • name

      protected String name
    • configuration

      protected com.google.gson.JsonObject configuration
    • ready

      protected boolean ready
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Description copied from interface: Plugin
      Get the unique identifier for this plugin.
      Specified by:
      getId in interface Plugin
      Returns:
      The plugin's unique ID
    • getName

      public String getName()
      Description copied from interface: Plugin
      Get the name of this plugin.
      Specified by:
      getName in interface Plugin
      Returns:
      The plugin's name
    • 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
      Parameters:
      configuration - The configuration parameters as a JSON object
    • isReady

      public boolean isReady()
      Description copied from interface: Plugin
      Check if the plugin is properly configured and ready to use.
      Specified by:
      isReady in interface Plugin
      Returns:
      true if the plugin is ready, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object