Class MQQueueConnection
java.lang.Object
com.ibm.mq.jms.MQRoot
com.ibm.mq.jms.MQConnection
com.ibm.mq.jms.MQQueueConnection
- All Implemented Interfaces:
JmsConnection, JmsPropertyContext, JmsQueueConnection, JmsReadablePropertyContext, Serializable, AutoCloseable, Map<String,Object>, javax.jms.Connection, javax.jms.QueueConnection
- Direct Known Subclasses:
MQXAQueueConnection
public class MQQueueConnection
extends MQConnection
implements javax.jms.QueueConnection, JmsQueueConnection
An MQueueConnection is an active connection to a JMS point-to-point provider.
A client uses an MQQueueConnection to create one or more MQQueueSessions for producing and
consuming messages.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.jms.ConnectionConsumercreateConnectionConsumer(javax.jms.Queue queue, String selector, javax.jms.ServerSessionPool sessionPool, int maxMessages) Creates a connection consumer for this connection.javax.jms.QueueSessioncreateQueueSession(boolean transacted, int acknowledgeMode) Creates an MQQueueSession object.Methods inherited from class MQConnection
close, createConnectionConsumer, createDurableConnectionConsumer, createSession, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop, toStringMethods inherited from class MQRoot
clear, containsKey, containsValue, entrySet, equals, get, getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, isEmpty, keySet, propertyExists, put, putAll, remove, setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, size, valuesMethods inherited from interface javax.jms.Connection
close, createConnectionConsumer, createDurableConnectionConsumer, createSession, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stopMethods inherited from interface JmsPropertyContext
setBatchProperties, setBooleanProperty, setByteProperty, setBytesProperty, setCharProperty, setDoubleProperty, setFloatProperty, setIntProperty, setLongProperty, setObjectProperty, setShortProperty, setStringProperty, toJsonMethods inherited from interface JmsReadablePropertyContext
getBooleanProperty, getByteProperty, getBytesProperty, getCharProperty, getDoubleProperty, getFloatProperty, getIntProperty, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, stringifyMeMethods inherited from interface Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
createConnectionConsumer
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Queue queue, String selector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException Creates a connection consumer for this connection. This is an expert facility that is not used by regular JMS clients.- Specified by:
createConnectionConsumerin interfacejavax.jms.QueueConnection- Parameters:
queue- the queue to access.selector- only messages with properties that match the message selector expression are delivered.sessionPool- the server session pool to associate with this connection consumer.maxMessages- the maximum number of messages that can be assigned to a server session at one time.- Returns:
- the connection consumer.
- Throws:
javax.jms.JMSException- if the JMS connection fails to create a connection consumer because of an internal error, or incorrect arguments for sessionPool and message selector.javax.jms.InvalidDestinationException- if the queue is not valid.javax.jms.InvalidSelectorException- if the message selector is not valid.- See Also:
-
createQueueSession
public javax.jms.QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException Creates an MQQueueSession object.- Specified by:
createQueueSessionin interfacejavax.jms.QueueConnection- Parameters:
transacted- - indicates whether the session is transacted.acknowledgeMode- - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.- Returns:
- a newly created queue session.
- Throws:
javax.jms.JMSException- if JMS Provider fails to create an MQQueueSession due to an internal error.
-