Package jadex.micro.tutorial.a5
Class ChatAgent
java.lang.Object
jadex.micro.tutorial.a5.ChatAgent
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionprotected jadex.core.IComponent
The underlying micro agent.protected Set
<IChatService> -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
agent
protected jadex.core.IComponent agentThe underlying micro agent. -
chatservices
-
-
Constructor Details
-
ChatAgent
public ChatAgent()
-
-
Method Details
-
message
Receives a chat message.- Specified by:
message
in interfaceIChatService
- Parameters:
sender
- The sender's name.text
- The message text.
-
onStart
protected void onStart() -
end
protected void end() -
getChatServices
Get the chat services.- Returns:
- The chat services.
-
main
Start the example.- Throws:
InterruptedException
-