Class ChatAgent

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

public class ChatAgent extends Object implements IChatService
Chat micro agent provides a basic chat service and publishes it as rest web service. It can be invoked via the standard service info page at the publish url: http://localhost:8081/chat. The agent receives the message and display at the console.
  • Field Details

    • agent

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

      protected Set<IChatService> chatservices
  • Constructor Details

    • ChatAgent

      public ChatAgent()
  • Method Details

    • 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.
    • onStart

      protected void onStart()
    • end

      protected void end()
    • 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