Package com.axemble.vdoc.sdk.impl
Class JMSController
java.lang.Object
com.axemble.vdoc.sdk.impl.JMSController
- All Implemented Interfaces:
IController,IJMSController,Serializable
SDK access to works with JMS needs
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcheckConsumers(String contextPrefix, String queueName) Return how many batch consumers are running on this queueintcheckConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Return how many batch consumers are running for this message processorlongcountMessage(String contextPrefix, String queueName) Get number of messages in queuelongcountMessage(String contextPrefix, String queueName, String messageFilter) Get number of messages in queue with message filtervoidcreateQueue(String contextPrefix, String queueName) Create a queuecreateQueueController(String contextPrefix, String queueName) Create and retrieve a IJMSQueueController for a queuebooleandeleteMessage(String contextPrefix, String queueName, long messageId) Delete a message in a queueintdeleteMessages(String contextPrefix, String queueName, String messageFilter) Delete messages in a queue with filtervoiddeleteQueue(String contextPrefix, String queueName) Delete a queueintemptyQueue(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 queuesbooleanqueueExist(String contextPrefix, String queueName) Test if a queue existvoidrunConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Run batch consumers for this message processorvoidstopConsumers(String contextPrefix, String queueName) Stop all batch consumers for this queuevoidstopConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Stop all batch consumers for this message processor
-
Constructor Details
-
JMSController
public JMSController()
-
-
Method Details
-
createQueueController
Description copied from interface:IJMSControllerCreate and retrieve a IJMSQueueController for a queue- Specified by:
createQueueControllerin interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue name- Returns:
- the IJMSQueueController instance
-
createQueue
Description copied from interface:IJMSControllerCreate a queue- Specified by:
createQueuein interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue name- Throws:
JMSQueueExistsException- the exception
-
queueExist
Description copied from interface:IJMSControllerTest if a queue exist- Specified by:
queueExistin interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue name- Returns:
- true if the queue exist otherwise false
-
deleteQueue
Description copied from interface:IJMSControllerDelete a queue- Specified by:
deleteQueuein interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue name- Throws:
JMSQueueMissingException- the exception
-
getQueues
Description copied from interface:IJMSControllerGet all queues- Specified by:
getQueuesin interfaceIJMSController- Returns:
- a list of IJMSQueueBean
-
checkConsumers
public int checkConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Description copied from interface:IJMSControllerReturn how many batch consumers are running for this message processor- Specified by:
checkConsumersin interfaceIJMSController- Parameters:
contextPrefix- the queue prefixqueueName- the queue namemessageProcessor- the message processor- Returns:
- the number of parallel batch consumer running
-
checkConsumers
Description copied from interface:IJMSControllerReturn how many batch consumers are running on this queue- Specified by:
checkConsumersin interfaceIJMSController- Parameters:
contextPrefix- the queue prefixqueueName- the queue name- Returns:
- the number of parallel batch consumer running
-
runConsumers
public void runConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Description copied from interface:IJMSControllerRun batch consumers for this message processor- Specified by:
runConsumersin interfaceIJMSController- Parameters:
contextPrefix- the queue prefixqueueName- the queue namemessageProcessor- the message processor
-
stopConsumers
public void stopConsumers(String contextPrefix, String queueName, IJMSMessageProcessor<? extends IJMSMessage> messageProcessor) Description copied from interface:IJMSControllerStop all batch consumers for this message processor- Specified by:
stopConsumersin interfaceIJMSController- Parameters:
contextPrefix- the queue prefixqueueName- the queue namemessageProcessor- the message processor
-
stopConsumers
Description copied from interface:IJMSControllerStop all batch consumers for this queue- Specified by:
stopConsumersin interfaceIJMSController- Parameters:
contextPrefix- the queue prefixqueueName- the queue name
-
countMessage
Description copied from interface:IJMSControllerGet number of messages in queue- Specified by:
countMessagein interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue name- Returns:
- the number of messages
-
countMessage
Description copied from interface:IJMSControllerGet number of messages in queue with message filter- Specified by:
countMessagein interfaceIJMSController- 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
Description copied from interface:IJMSControllerEmpty a queue- Specified by:
emptyQueuein interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue name- Returns:
- the number of messages deleted
-
deleteMessage
Description copied from interface:IJMSControllerDelete a message in a queue- Specified by:
deleteMessagein interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue namemessageId- the message id- Returns:
- true if message has been deleted otherwise false
-
deleteMessages
Description copied from interface:IJMSControllerDelete messages in a queue with filter- Specified by:
deleteMessagesin interfaceIJMSController- 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
public List<IJMSMessageBean> getMessages(String contextPrefix, String queueName, int maxMessages) throws JMSQueueMissingException Description copied from interface:IJMSControllerGet messages in queue- Specified by:
getMessagesin interfaceIJMSController- Parameters:
contextPrefix- The queue prefixqueueName- the queue namemaxMessages- number of messages to get- Returns:
- a list of IJMSMessageBean
- Throws:
JMSQueueMissingException
-
getMessages
public List<IJMSMessageBean> getMessages(String contextPrefix, String queueName, String messageFilter, int maxMessages) throws JMSQueueMissingException Description copied from interface:IJMSControllerGet messages in queue- Specified by:
getMessagesin interfaceIJMSController- 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
-