Package org.objectweb.joram.client.jms
Class QueueConnection
- java.lang.Object
-
- org.objectweb.joram.client.jms.Connection
-
- org.objectweb.joram.client.jms.QueueConnection
-
- All Implemented Interfaces:
AutoCloseable,Connection,QueueConnection,ConnectionMBean
- Direct Known Subclasses:
XAQueueConnection
public class QueueConnection extends Connection implements QueueConnection
Implements thejavax.jms.QueueConnectioninterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.objectweb.joram.client.jms.Connection
Connection.AtomicCounter, Connection.Closer
-
-
Field Summary
-
Fields inherited from class org.objectweb.joram.client.jms.Connection
JMXBeanBaseName, logger, MESSAGE_ID_PREFIX_PROPERTY, messageConsumers, tracker
-
-
Constructor Summary
Constructors Constructor Description QueueConnection()Creates aQueueConnectioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConnectionConsumercreateConnectionConsumer(Queue queue, String selector, ServerSessionPool sessionPool, int maxMessages)API method.ConnectionConsumercreateDurableConnectionConsumer(Topic topic, String subname, String selector, ServerSessionPool sessPool, int maxMessages)API method.QueueSessioncreateQueueSession(boolean transacted, int acknowledgeMode)API method.-
Methods inherited from class org.objectweb.joram.client.jms.Connection
addSession, checkCLMessageProducer, checkClosed, checkCLSession, checkConsumers, checkThread, cleanup, close, closeConnectionConsumer, closeMessageConsumer, closeSession, createConnectionConsumer, createSession, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, doClose, equals, getAsyncSend, getClientID, getCompressedMinSize, getCompressionLevel, getExceptionListener, getImplicitAck, getInInterceptors, getJMXBeanName, getMetaData, getOutInterceptors, getOutLocalAddress, getOutLocalPort, getProxyId, getQueueMessageReadMax, getRequestMultiplexer, getTopicAckBufferMax, getTopicActivationThreshold, getTopicPassivationThreshold, getTxPendingTimer, hashCode, isOpenMessageConsumer, isStopped, lockClientId, nextMessageId, nextSessionId, nextSubName, open, openMessageConsumer, registerMBean, setClientID, setExceptionListener, setJMXBeanBaseName, setProviderClientID, start, stop, syncRequest, toString, unregisterMBean
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.Connection
close, createConnectionConsumer, createSession, createSession, createSession, createSharedConnectionConsumer, createSharedDurableConnectionConsumer, getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener, start, stop
-
-
-
-
Method Detail
-
createConnectionConsumer
public ConnectionConsumer createConnectionConsumer(Queue queue, String selector, ServerSessionPool sessionPool, int maxMessages) throws JMSException
API method. Creates a connection consumer for this connection, this is an expert facility needed for applications servers.- Specified by:
createConnectionConsumerin interfaceQueueConnection- Parameters:
queue- the queue to access.selector- only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for this message consumer.sessionPool- the server session pool to associate with this connection consumermaxMessages- the maximum number of messages that can be assigned to a server session at one time.- Returns:
- The connection consumer.
- Throws:
IllegalStateException- If the connection is closed.InvalidSelectorException- If the selector syntax is wrong.InvalidDestinationException- If the target destination does not exist.JMSException- If the method fails for any other reason.
-
createQueueSession
public QueueSession createQueueSession(boolean transacted, int acknowledgeMode) throws JMSException
API method. Creates a QueueSession object.- Specified by:
createQueueSessionin interfaceQueueConnection- 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 session.
- Throws:
IllegalStateException- If the connection is closed.JMSException- In case of an invalid acknowledge mode.
-
createDurableConnectionConsumer
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subname, String selector, ServerSessionPool sessPool, int maxMessages) throws JMSException
API method.- Specified by:
createDurableConnectionConsumerin interfaceConnection- Overrides:
createDurableConnectionConsumerin classConnection- Parameters:
topic- the topic to access.subname- durable subscription name.selector- only messages with properties matching the message selector expression are delivered. A value of null or an empty string indicates that there is no message selector for this message consumer.sessPool- 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 durable connection consumer.
- Throws:
IllegalStateException- Systematically.InvalidSelectorException- If the selector syntax is wrong.InvalidDestinationException- If the target topic does not exist.JMSException- If the method fails for any other reason.
-
-