Class ChatAgent

java.lang.Object
jadex.micro.tutorial.a4.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 service query can be used on a collection variable. The var 'chatservices' is kept up to date with available services.
  • Field Details

    • agent

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

      protected ChatGui gui
    • chatservices

      protected Set<IChatService> chatservices
  • 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.
    • getChatServices

      public Set<IChatService> getChatServices()
      Get the chat services.
      Returns:
      The chat services.
    • main

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