Class Jms11Support
java.lang.Object
org.mule.jms.commons.internal.support.AbstractJmsSupport
org.mule.jms.commons.internal.support.Jms20Support
org.mule.jms.commons.internal.support.Jms11Support
- All Implemented Interfaces:
JmsSupport
- Direct Known Subclasses:
Jms102bSupport
Jms11Support is a template class to provide an abstraction to to the JMS 1.1 API specification.- Since:
- 1.0
-
Field Summary
Fields inherited from class org.mule.jms.commons.internal.support.AbstractJmsSupport
logger -
Constructor Summary
ConstructorsConstructorDescriptionJms11Support(LookupJndiDestination lookupJndiDestination, Function<String, Optional<jakarta.jms.Destination>> jndiObjectSupplier) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.jms.MessageConsumercreateConsumer(jakarta.jms.Session session, jakarta.jms.Destination destination, String messageSelector, ConsumerType type) Creates a new JMSMessageConsumerusing the givenSessionvoidsend(jakarta.jms.MessageProducer producer, jakarta.jms.Message message, boolean persistent, int priority, long ttl, boolean topic, jakarta.jms.CompletionListener completionListener) Sends the givenMessageto the indicatedDestinationusing the parametrized configurations.Methods inherited from class org.mule.jms.commons.internal.support.AbstractJmsSupport
createConnection, createConnection, createDestination, createDestinationFromJndi, createProducer, createSession, createTemporaryDestination, createXaConnection, createXaConnection, createXaSession, getJndiDestination, getLookupJndiDestination, send
-
Constructor Details
-
Jms11Support
public Jms11Support() -
Jms11Support
public Jms11Support(LookupJndiDestination lookupJndiDestination, Function<String, Optional<jakarta.jms.Destination>> jndiObjectSupplier)
-
-
Method Details
-
getSpecification
- Specified by:
getSpecificationin interfaceJmsSupport- Overrides:
getSpecificationin classJms20Support- Returns:
thisimplementationJmsSpecification
-
createConsumer
public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Session session, jakarta.jms.Destination destination, String messageSelector, ConsumerType type) throws jakarta.jms.JMSException Creates a new JMSMessageConsumerusing the givenSession- Specified by:
createConsumerin interfaceJmsSupport- Overrides:
createConsumerin classAbstractJmsSupport- Parameters:
session- theSessionused to create theMessageConsumerdestination- theDestinationfrom whichMessages will be consumedmessageSelector- a JMS selector string for filtering incomingMessages. Empty ornullimplies no filteringtype- theConsumerTypeto use based on theDestinationtype- Returns:
- a new
MessageConsumerfor the givenDestination - Throws:
jakarta.jms.JMSException- if an error occurs while creating the consumer
-
send
public void send(jakarta.jms.MessageProducer producer, jakarta.jms.Message message, boolean persistent, int priority, long ttl, boolean topic, jakarta.jms.CompletionListener completionListener) throws jakarta.jms.JMSException Sends the givenMessageto the indicatedDestinationusing the parametrized configurations. Because of async publishing didn't exist on JMS 1.1 or prior. This method will be blocking and sync.- Specified by:
sendin interfaceJmsSupport- Overrides:
sendin classAbstractJmsSupport- Parameters:
producer- theMessageProducerto use for sending the messagemessage- theMessageto sendpersistent-trueifDeliveryMode.PERSISTENTshould be usedpriority- theMessage.getJMSPriority()to be set on sendttl- the message's lifetime (in milliseconds)topic- used byJmsSpecification.JMS_1_0_2bto decide whether to use theMessageProducerasTopicPublisheror aQueueSender- Throws:
jakarta.jms.JMSException- if an error occurs during messsage sending
-