Class MessageQueueAgent

  • All Implemented Interfaces:
    IMessageQueueService

    public class MessageQueueAgent
    extends java.lang.Object
    implements IMessageQueueService
    This agent represents the central message queue. It offers a message queue service that is used by the clients.
    • Constructor Detail

      • MessageQueueAgent

        public MessageQueueAgent()
    • Method Detail

      • agentCreated

        public void agentCreated()
        Called on agent creation.
      • subscribe

        public ISubscriptionIntermediateFuture<Event> subscribe​(java.lang.String topic)
        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 interface IMessageQueueService
        Parameters:
        topic - The topic.
        Returns:
        The events.
      • publish

        public IFuture<java.lang.Void> publish​(java.lang.String topic,
                                               Event event)
        Publish a new event to the queue.
        Specified by:
        publish in interface IMessageQueueService
        Parameters:
        topic - The topic.
        event - The event to publish.