Class BaseAgent

java.lang.Object
com.techcognita.javachatx.agent.BaseAgent
All Implemented Interfaces:
Agent
Direct Known Subclasses:
EchoAgent

public abstract class BaseAgent extends Object implements Agent
Base implementation of the Agent interface. Provides common functionality for all agents in the JavaChatX framework.
  • Field Details

    • id

      protected String id
    • name

      protected String name
    • configuration

      protected com.google.gson.JsonObject configuration
  • Constructor Details

  • Method Details

    • getId

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

      public String getName()
      Description copied from interface: Agent
      Get the name of this agent.
      Specified by:
      getName in interface Agent
      Returns:
      The agent's name
    • configure

      public void configure(com.google.gson.JsonObject configuration)
      Description copied from interface: Agent
      Configure the agent with specific settings.
      Specified by:
      configure in interface Agent
      Parameters:
      configuration - The configuration parameters as a JSON object
    • toString

      public String toString()
      Overrides:
      toString in class Object