Package com.axemble.vdoc.sdk.interfaces
Interface IJMSController
- All Superinterfaces:
IController
,Serializable
- All Known Implementing Classes:
JMSController
-
Method Summary
Modifier and TypeMethodDescriptionint
checkConsumers
(String contextPrefix, String queueName) Return how many batch consumers are running on this queueint
checkConsumers
(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Return how many batch consumers are running for this message processorlong
countMessage
(String contextPrefix, String queueName) Get number of messages in queuelong
countMessage
(String contextPrefix, String queueName, String messageFilter) Get number of messages in queue with message filtervoid
createQueue
(String contextPrefix, String queueName) Create a queuecreateQueueController
(String contextPrefix, String queueName) Create and retrieve a IJMSQueueController for a queueboolean
deleteMessage
(String contextPrefix, String queueName, long messageId) Delete a message in a queueint
deleteMessages
(String contextPrefix, String queueName, String messageFilter) Delete messages in a queue with filtervoid
deleteQueue
(String contextPrefix, String queueName) Delete a queueint
emptyQueue
(String contextPrefix, String queueName) Empty a queuegetMessages
(String contextPrefix, String queueName, int maxMessages) Get messages in queuegetMessages
(String contextPrefix, String queueName, String messageFilter, int maxMessages) Get messages in queueGet all queuesboolean
queueExist
(String contextPrefix, String queueName) Test if a queue existvoid
runConsumers
(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Run batch consumers for this message processorvoid
stopConsumers
(String contextPrefix, String queueName) Stop all batch consumers for this queuevoid
stopConsumers
(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Stop all batch consumers for this message processor
-
Method Details
-
createQueueController
Create and retrieve a IJMSQueueController for a queue- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue name- Returns:
- the IJMSQueueController instance
-
createQueue
Create a queue- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue name- Throws:
JMSQueueExistsException
- the exception
-
queueExist
Test if a queue exist- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue name- Returns:
- true if the queue exist otherwise false
-
deleteQueue
Delete a queue- Parameters:
contextPrefix
- The queue prefixqueueName
- 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 prefixqueueName
- the queue namemessageProcessor
- the message processor- Returns:
- the number of parallel batch consumer running
-
checkConsumers
Return how many batch consumers are running on this queue- Parameters:
contextPrefix
- the queue prefixqueueName
- 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 prefixqueueName
- the queue namemessageProcessor
- 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 prefixqueueName
- the queue namemessageProcessor
- the message processor
-
stopConsumers
Stop all batch consumers for this queue- Parameters:
contextPrefix
- the queue prefixqueueName
- the queue name
-
countMessage
Get number of messages in queue- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue name- Returns:
- the number of messages
-
countMessage
Get number of messages in queue with message filter- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue namemessageFilter
- The filter to apply on message properties - example : "JMSType = 'car' AND color = 'blue' AND weight > 2500"- Returns:
- the number of messages
-
emptyQueue
Empty a queue- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue name- Returns:
- the number of messages deleted
-
deleteMessage
Delete a message in a queue- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue namemessageId
- the message id- Returns:
- true if message has been deleted otherwise false
-
deleteMessages
Delete messages in a queue with filter- Parameters:
contextPrefix
- The queue prefixqueueName
- the queue namemessageFilter
- 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 prefixqueueName
- the queue namemaxMessages
- 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 prefixqueueName
- the queue namemessageFilter
- 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
-