Package org.ow2.joram.jakarta.jms
Class TopicConnection
- java.lang.Object
-
- org.ow2.joram.jakarta.jms.Connection
-
- org.ow2.joram.jakarta.jms.TopicConnection
-
- All Implemented Interfaces:
jakarta.jms.Connection,jakarta.jms.TopicConnection,AutoCloseable,ConnectionMBean
- Direct Known Subclasses:
XATopicConnection
public class TopicConnection extends Connection implements jakarta.jms.TopicConnection
Implements thejakarta.jms.TopicConnectioninterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.ow2.joram.jakarta.jms.Connection
Connection.AtomicCounter, Connection.Closer
-
-
Field Summary
-
Fields inherited from class org.ow2.joram.jakarta.jms.Connection
JMXBeanBaseName, MESSAGE_ID_PREFIX_PROPERTY, messageConsumers
-
-
Constructor Summary
Constructors Constructor Description TopicConnection()Creates aTopicConnectioninstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description jakarta.jms.ConnectionConsumercreateConnectionConsumer(jakarta.jms.Topic topic, String selector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages)API method.jakarta.jms.ConnectionConsumercreateDurableConnectionConsumer(jakarta.jms.Topic topic, String subName, String selector, jakarta.jms.ServerSessionPool sessPool, int maxMessages)API method.jakarta.jms.TopicSessioncreateTopicSession(boolean transacted, int acknowledgeMode)API method.-
Methods inherited from class org.ow2.joram.jakarta.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
-
-
-
-
Method Detail
-
createConnectionConsumer
public jakarta.jms.ConnectionConsumer createConnectionConsumer(jakarta.jms.Topic topic, String selector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSExceptionAPI method. Creates a connection consumer for this connection, this is an expert facility needed for applications servers.- Specified by:
createConnectionConsumerin interfacejakarta.jms.TopicConnection- Parameters:
topic- the topic 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 consumer.maxMessages- the maximum number of messages that can be assigned to a server session at one time.- Returns:
- The connection consumer.
- Throws:
jakarta.jms.IllegalStateException- If the connection is closed.jakarta.jms.InvalidSelectorException- If the selector syntax is wrong.jakarta.jms.InvalidDestinationException- If the target destination does not exist.jakarta.jms.JMSException- If the method fails for any other reason.
-
createTopicSession
public jakarta.jms.TopicSession createTopicSession(boolean transacted, int acknowledgeMode) throws jakarta.jms.JMSExceptionAPI method. Creates a TopicSession object.- Specified by:
createTopicSessionin interfacejakarta.jms.TopicConnection- 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:
jakarta.jms.IllegalStateException- If the connection is closed.jakarta.jms.JMSException- In case of an invalid acknowledge mode.
-
createDurableConnectionConsumer
public jakarta.jms.ConnectionConsumer createDurableConnectionConsumer(jakarta.jms.Topic topic, String subName, String selector, jakarta.jms.ServerSessionPool sessPool, int maxMessages) throws jakarta.jms.JMSExceptionAPI method.- Specified by:
createDurableConnectionConsumerin interfacejakarta.jms.Connection- Specified by:
createDurableConnectionConsumerin interfacejakarta.jms.TopicConnection- 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:
jakarta.jms.IllegalStateException- If the connection is closed.jakarta.jms.InvalidSelectorException- If the selector syntax is wrong.jakarta.jms.InvalidDestinationException- If the target topic does not exist.jakarta.jms.JMSException- If the method fails for any other reason.
-
-