Class QueueListener

  • All Implemented Interfaces:
    javax.jms.MessageListener, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class QueueListener
    extends ServiceConfig
    implements javax.jms.MessageListener
    Queue Listener (application listener) Class which manages receiving messages from topic queue
    Author:
    Pablos - 20/NOV/2013
    • Constructor Detail

      • QueueListener

        public QueueListener​(QueryService queryService,
                             BroadcastService broadcastService)
        Autowired constructor
        Parameters:
        queryService - query service
        broadcastService - broadcast service
    • Method Detail

      • onMessage

        public void onMessage​(javax.jms.Message message)
        Broadcast a message each time is called
        Specified by:
        onMessage in interface javax.jms.MessageListener
        Parameters:
        message - Message
      • getAddress

        public ComponentAddress getAddress()
        Get component address
        Returns:
        Component address
      • setAddress

        public QueueListener setAddress​(ComponentAddress address)
        Set component address
        Parameters:
        address - Component address
        Returns:
        this
      • getQuery

        public Query getQuery()
        Get query
        Returns:
        query
      • setQuery

        public QueueListener setQuery​(Query query)
        Set query
        Parameters:
        query - Query
        Returns:
        this
      • getParameterMap

        public Map<String,​QueryParameter> getParameterMap()
        Get parameter map
        Returns:
        parameter map