public class JmsConnection extends Object implements org.mule.runtime.api.lifecycle.Stoppable, org.mule.runtime.api.lifecycle.Disposable
| Constructor and Description |
|---|
JmsConnection(JmsSupport jmsSupport,
javax.jms.Connection connection,
JmsSessionManager jmsSessionManager,
CompositeJmsExceptionListener exceptionListener) |
| Modifier and Type | Method and Description |
|---|---|
JmsMessageConsumer |
createConsumer(JmsSession session,
javax.jms.Destination jmsDestination,
String selector,
ConsumerType consumerType)
Creates a new JMS
MessageConsumer using the given Session |
JmsMessageProducer |
createProducer(JmsSession session,
javax.jms.Destination jmsDestination,
boolean isTopic)
Creates a new JMS
MessageProducer using the given Session |
JmsSession |
createSession(InternalAckMode ackMode,
boolean isTopic)
Creates a new JMS
Session using the current Connection |
void |
dispose() |
javax.jms.Connection |
get() |
JmsSupport |
getJmsSupport() |
void |
registerExceptionListener(javax.jms.ExceptionListener exceptionListener) |
void |
stop()
Temporarily stops a connection's delivery of incoming messages.
|
public JmsConnection(JmsSupport jmsSupport, javax.jms.Connection connection, JmsSessionManager jmsSessionManager, CompositeJmsExceptionListener exceptionListener)
public JmsSupport getJmsSupport()
public javax.jms.Connection get()
public JmsSession createSession(InternalAckMode ackMode, boolean isTopic) throws javax.jms.JMSException
Session using the current ConnectionackMode - the Session InternalAckModeisTopic - if true the Session created will be a TopicSession.
This distinction is made only for JmsSpecification.JMS_1_0_2b]Sessionjavax.jms.JMSException - if an error occurs while creating the Sessionpublic JmsMessageConsumer createConsumer(JmsSession session, javax.jms.Destination jmsDestination, String selector, ConsumerType consumerType) throws javax.jms.JMSException
MessageConsumer using the given Sessionsession - the JmsSession used to create the MessageConsumerjmsDestination - the Destination from which Messages will be consumedselector - a JMS selector string for filtering incoming Messages. Empty or null implies no filteringconsumerType - the ConsumerType to use based on the Destination typeMessageConsumer for the given Destinationjavax.jms.JMSException - if an error occurs while creating the consumerpublic JmsMessageProducer createProducer(JmsSession session, javax.jms.Destination jmsDestination, boolean isTopic) throws javax.jms.JMSException
MessageProducer using the given Sessionsession - the JmsSession used to create the MessageProducerjmsDestination - the Destination to where the Messages will be publishedisTopic - 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 consumerpublic void stop()
throws org.mule.runtime.api.exception.MuleException
start method. When
the connection is stopped, delivery to all the connection's message
consumers is inhibited.stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void registerExceptionListener(javax.jms.ExceptionListener exceptionListener)
Copyright © 2019. All rights reserved.