Interface IJMSController

All Superinterfaces:
IController, Serializable
All Known Implementing Classes:
JMSController

public interface IJMSController extends IController
  • Method Details

    • createQueueController

      IJMSQueueController createQueueController(String contextPrefix, String queueName)
      Create and retrieve a IJMSQueueController for a queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      Returns:
      the IJMSQueueController instance
    • createQueue

      void createQueue(String contextPrefix, String queueName) throws JMSQueueExistsException
      Create a queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      Throws:
      JMSQueueExistsException - the exception
    • queueExist

      boolean queueExist(String contextPrefix, String queueName)
      Test if a queue exist
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      Returns:
      true if the queue exist otherwise false
    • deleteQueue

      void deleteQueue(String contextPrefix, String queueName) throws JMSQueueMissingException
      Delete a queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      Throws:
      JMSQueueMissingException - the exception
    • getQueues

      List<IJMSQueueBean> getQueues()
      Get all queues
      Returns:
      a list of IJMSQueueBean
    • checkConsumers

      int checkConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor)
      Return how many batch consumers are running for this message processor
      Parameters:
      contextPrefix - the queue prefix
      queueName - the queue name
      messageProcessor - the message processor
      Returns:
      the number of parallel batch consumer running
    • checkConsumers

      int checkConsumers(String contextPrefix, String queueName)
      Return how many batch consumers are running on this queue
      Parameters:
      contextPrefix - the queue prefix
      queueName - the queue name
      Returns:
      the number of parallel batch consumer running
    • runConsumers

      void runConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor)
      Run batch consumers for this message processor
      Parameters:
      contextPrefix - the queue prefix
      queueName - the queue name
      messageProcessor - the message processor
    • stopConsumers

      void stopConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor)
      Stop all batch consumers for this message processor
      Parameters:
      contextPrefix - the queue prefix
      queueName - the queue name
      messageProcessor - the message processor
    • stopConsumers

      void stopConsumers(String contextPrefix, String queueName)
      Stop all batch consumers for this queue
      Parameters:
      contextPrefix - the queue prefix
      queueName - the queue name
    • countMessage

      long countMessage(String contextPrefix, String queueName)
      Get number of messages in queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      Returns:
      the number of messages
    • countMessage

      long countMessage(String contextPrefix, String queueName, String messageFilter)
      Get number of messages in queue with message filter
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      messageFilter - The filter to apply on message properties - example : "JMSType = 'car' AND color = 'blue' AND weight > 2500"
      Returns:
      the number of messages
    • emptyQueue

      int emptyQueue(String contextPrefix, String queueName)
      Empty a queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      Returns:
      the number of messages deleted
    • deleteMessage

      boolean deleteMessage(String contextPrefix, String queueName, long messageId)
      Delete a message in a queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      messageId - the message id
      Returns:
      true if message has been deleted otherwise false
    • deleteMessages

      int deleteMessages(String contextPrefix, String queueName, String messageFilter)
      Delete messages in a queue with filter
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      messageFilter - The filter to apply on message properties - example : "JMSType = 'car' AND color = 'blue' AND weight > 2500"
      Returns:
      the number of messages deleted
    • getMessages

      List<IJMSMessageBean> getMessages(String contextPrefix, String queueName, int maxMessages) throws JMSQueueMissingException
      Get messages in queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      maxMessages - number of messages to get
      Returns:
      a list of IJMSMessageBean
      Throws:
      JMSQueueMissingException
    • getMessages

      List<IJMSMessageBean> getMessages(String contextPrefix, String queueName, String messageFilter, int maxMessages) throws JMSQueueMissingException
      Get messages in queue
      Parameters:
      contextPrefix - The queue prefix
      queueName - the queue name
      messageFilter - The filter to apply on message properties - example : "JMSType = 'car' AND color = 'blue' AND weight > 2500"
      maxMessages - number of messages to get
      Returns:
      a list of IJMSMessageBean
      Throws:
      JMSQueueMissingException