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