public interface JmsSupport
JmsSupport is an interface that provides a polymorphic facade to
the JMS 1.0.2b, 1.1 and 2.0 API specifications. this interface is not intended for
general purpose use and should only be used with the Mule JMS connector.| Modifier and Type | Method and Description |
|---|---|
javax.jms.Connection |
createConnection(javax.jms.ConnectionFactory connectionFactory)
Creates a new
Connection |
javax.jms.Connection |
createConnection(javax.jms.ConnectionFactory connectionFactory,
String username,
String password)
Creates a new
Connection with custom user/password authentication |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Session session,
javax.jms.Destination destination,
String messageSelector,
ConsumerType type)
Creates a new JMS
MessageConsumer using the given Session |
javax.jms.Destination |
createDestination(javax.jms.Session session,
String name,
boolean topic)
Creates a new JMS
Destination with the given name. |
javax.jms.MessageProducer |
createProducer(javax.jms.Session session,
javax.jms.Destination destination,
boolean topic)
Creates a new JMS
MessageProducer using the given Session |
javax.jms.Session |
createSession(javax.jms.Connection connection,
boolean topic,
boolean transacted,
int ackMode)
Creates a new
Session for the given Connection |
javax.jms.Destination |
createTemporaryDestination(javax.jms.Session session)
Creates an anonymous temporary
Queue Destination |
JmsSpecification |
getSpecification() |
void |
send(javax.jms.MessageProducer producer,
javax.jms.Message message,
boolean persistent,
int priority,
long ttl,
boolean topic)
Sends the given
Message to the indicated Destination using the parametrized configurations |
javax.jms.Connection createConnection(javax.jms.ConnectionFactory connectionFactory)
throws javax.jms.JMSException
ConnectionconnectionFactory - the ConnectionFactory to use for creating the ConnectionConnectionjavax.jms.JMSException - if an error occurs during connection creationjavax.jms.Connection createConnection(javax.jms.ConnectionFactory connectionFactory,
String username,
String password)
throws javax.jms.JMSException
Connection with custom user/password authenticationconnectionFactory - the ConnectionFactory to use for creating the Connectionusername - the credentials usernamepassword - the credentials passwordConnectionjavax.jms.JMSException - if an error occurs during connection creationjavax.jms.Session createSession(javax.jms.Connection connection,
boolean topic,
boolean transacted,
int ackMode)
throws javax.jms.JMSException
Session for the given Connectionconnection - the Connection to use for creating the Sessiontopic - if true the Session created will be a TopicSession.
This distinction is made only for JmsSpecification.JMS_1_0_2btransacted - indicates whether the session will use a local transactionackMode - the Session AckModeSessionjavax.jms.JMSException - if an error occurs during connection creationjavax.jms.Destination createDestination(javax.jms.Session session,
String name,
boolean topic)
throws javax.jms.JMSException,
DestinationNotFoundException
Destination with the given name.
If LookupJndiDestination.ALWAYS or LookupJndiDestination.TRY_ALWAYS where configured,
this name will be used for performing the JNDI lookupsession - the Session used to create the Destinationname - the name of the destinationtopic - if true, a Topic Destination will be created,
otherwise the Queue default is usedDestinationjavax.jms.JMSException - if an error occurs during the creation of the destinationDestinationNotFoundException - if LookupJndiDestination.ALWAYS is configured
and no Destination with the given name is foundjavax.jms.Destination createTemporaryDestination(javax.jms.Session session)
throws javax.jms.JMSException
Queue Destinationsession - the Session used to create the DestinationQueue Destinationjavax.jms.JMSException - if an error occurs during destination creationjavax.jms.MessageProducer createProducer(javax.jms.Session session,
javax.jms.Destination destination,
boolean topic)
throws javax.jms.JMSException
MessageProducer using the given Sessionsession - the Session used to create the MessageProducerdestination - the Destination to where the Messages will be publishedtopic - if true the given Destination has a Topic destination type.
This distinction is made only for JmsSpecification.JMS_1_0_2b in order to decide whether
to create a TopicPublisher or a QueueSenderMessageProducer for the given Destinationjavax.jms.JMSException - if an error occurs while creating the consumervoid send(javax.jms.MessageProducer producer,
javax.jms.Message message,
boolean persistent,
int priority,
long ttl,
boolean topic)
throws javax.jms.JMSException
Message to the indicated Destination using the parametrized configurationsproducer - the MessageProducer to use for sending the messagemessage - the Message to sendpersistent - true if DeliveryMode.PERSISTENT should be usedpriority - the Message.getJMSPriority() to be set on sendttl - the message's lifetime (in milliseconds)topic - used by JmsSpecification.JMS_1_0_2b to decide whether to use the MessageProducer
as TopicPublisher or a QueueSenderjavax.jms.JMSException - if an error occurs during messsage sendingjavax.jms.MessageConsumer createConsumer(javax.jms.Session session,
javax.jms.Destination destination,
String messageSelector,
ConsumerType type)
throws javax.jms.JMSException
MessageConsumer using the given Sessionsession - the Session used to create the MessageConsumerdestination - the Destination from which Messages will be consumedmessageSelector - a JMS selector string for filtering incoming Messages. Empty or null implies no filteringtype - the ConsumerType to use based on the Destination typeMessageConsumer for the given Destinationjavax.jms.JMSException - if an error occurs while creating the consumerJmsSpecification getSpecification()
this implementation JmsSpecificationCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.