Class ChatAgent

java.lang.Object
jadex.micro.tutorial.a3.ChatAgent
All Implemented Interfaces:
IChatService

public class ChatAgent extends Object implements IChatService
Chat micro agent provides a basic chat service. This example shows how a simple chat user interface can be provided via swing. The ui interacts with the agent via the external access (as all external threads).
  • Field Details

    • agent

      protected jadex.core.IComponent agent
      The underlying micro agent.
    • gui

      protected ChatGui gui
  • Constructor Details

    • ChatAgent

      public ChatAgent()
  • Method Details

    • onStart

      protected void onStart()
    • end

      protected void end()
    • message

      public void message(String sender, String text)
      Receives a chat message.
      Specified by:
      message in interface IChatService
      Parameters:
      sender - The sender's name.
      text - The message text.
    • main

      public static void main(String[] args) throws InterruptedException
      Start the example.
      Throws:
      InterruptedException