Package jadex.micro.messagequeue
Class MessageQueueAgent
java.lang.Object
jadex.micro.messagequeue.MessageQueueAgent
- All Implemented Interfaces:
IMessageQueueService
This agent represents the central message queue. It offers a
message queue service that is used by the clients.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
agent
protected jadex.core.IComponent agentThe agent. -
subscribers
The map of subscribers.
-
-
Constructor Details
-
MessageQueueAgent
public MessageQueueAgent()
-
-
Method Details
-
agentCreated
public void agentCreated()Called on agent creation. -
subscribe
Subscribe to a specific topic. New events that fit to the topic are forwarded to all subscribers as intermediate results. A subscribe can unsubscribe by terminating the future.- Specified by:
subscribe
in interfaceIMessageQueueService
- Parameters:
topic
- The topic.- Returns:
- The events.
-
publish
Publish a new event to the queue.- Specified by:
publish
in interfaceIMessageQueueService
- Parameters:
topic
- The topic.event
- The event to publish.
-