public class ActiveMQSession extends Object implements javax.jms.QueueSession, javax.jms.TopicSession
| Modifier and Type | Field and Description |
|---|---|
static int |
TYPE_GENERIC_SESSION |
static int |
TYPE_QUEUE_SESSION |
static int |
TYPE_TOPIC_SESSION |
| Modifier | Constructor and Description |
|---|---|
protected |
ActiveMQSession(ConnectionFactoryOptions options,
ActiveMQConnection connection,
boolean transacted,
boolean xa,
int ackMode,
boolean cacheDestination,
boolean enable1xPrefixes,
ClientSession session,
int sessionType) |
| Modifier and Type | Method and Description |
|---|---|
void |
ackAllConsumers() |
void |
close() |
void |
commit() |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue) |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue,
String filterString) |
javax.jms.BytesMessage |
createBytesMessage() |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination) |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
String messageSelector) |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
String messageSelector,
boolean noLocal) |
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name) |
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal) |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name) |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal) |
javax.jms.MapMessage |
createMapMessage() |
javax.jms.Message |
createMessage() |
javax.jms.ObjectMessage |
createObjectMessage() |
javax.jms.ObjectMessage |
createObjectMessage(Serializable object) |
javax.jms.MessageProducer |
createProducer(javax.jms.Destination destination) |
javax.jms.TopicPublisher |
createPublisher(javax.jms.Topic topic) |
javax.jms.Queue |
createQueue(String queueName) |
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue) |
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue,
String messageSelector) |
javax.jms.QueueSender |
createSender(javax.jms.Queue queue) |
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName) |
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String name,
String messageSelector)
Note: Needs to throw an exception if a subscriptionName is already in use by another topic, or if the messageSelector is different
validate multiple subscriptions on the same session.
|
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name) |
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector) |
javax.jms.StreamMessage |
createStreamMessage() |
javax.jms.TopicSubscriber |
createSubscriber(javax.jms.Topic topic) |
javax.jms.TopicSubscriber |
createSubscriber(javax.jms.Topic topic,
String messageSelector,
boolean noLocal) |
javax.jms.TemporaryQueue |
createTemporaryQueue() |
javax.jms.TemporaryTopic |
createTemporaryTopic() |
javax.jms.TextMessage |
createTextMessage() |
javax.jms.TextMessage |
createTextMessage(String text) |
javax.jms.Topic |
createTopic(String topicName) |
void |
deleteTemporaryQueue(ActiveMQDestination tempQueue) |
void |
deleteTemporaryTopic(ActiveMQDestination tempTopic) |
int |
getAcknowledgeMode() |
ActiveMQConnection |
getConnection() |
ClientSession |
getCoreSession() |
String |
getDeserializationBlackList() |
String |
getDeserializationWhiteList() |
javax.jms.MessageListener |
getMessageListener() |
javax.jms.QueueSession |
getQueueSession() |
javax.jms.Session |
getSession() |
javax.jms.TopicSession |
getTopicSession() |
boolean |
getTransacted() |
XAResource |
getXAResource() |
protected javax.jms.Queue |
internalCreateQueue(String queueName) |
protected ActiveMQQueue |
internalCreateQueueCompatibility(String queueName) |
protected javax.jms.Topic |
internalCreateTopic(String topicName,
boolean retry) |
boolean |
isEnable1xPrefixes() |
boolean |
isRecoverCalled() |
boolean |
isXA() |
void |
recover() |
void |
removeConsumer(ActiveMQMessageConsumer consumer) |
void |
rollback() |
void |
run() |
void |
setMessageListener(javax.jms.MessageListener listener) |
void |
setRecoverCalled(boolean recoverCalled) |
void |
start() |
void |
stop() |
String |
toString() |
void |
unsubscribe(String name) |
public static final int TYPE_GENERIC_SESSION
public static final int TYPE_QUEUE_SESSION
public static final int TYPE_TOPIC_SESSION
protected ActiveMQSession(ConnectionFactoryOptions options, ActiveMQConnection connection, boolean transacted, boolean xa, int ackMode, boolean cacheDestination, boolean enable1xPrefixes, ClientSession session, int sessionType)
public javax.jms.BytesMessage createBytesMessage()
throws javax.jms.JMSException
createBytesMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MapMessage createMapMessage()
throws javax.jms.JMSException
createMapMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.Message createMessage()
throws javax.jms.JMSException
createMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.ObjectMessage createObjectMessage()
throws javax.jms.JMSException
createObjectMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.ObjectMessage createObjectMessage(Serializable object) throws javax.jms.JMSException
createObjectMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.StreamMessage createStreamMessage()
throws javax.jms.JMSException
createStreamMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.TextMessage createTextMessage()
throws javax.jms.JMSException
createTextMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.TextMessage createTextMessage(String text) throws javax.jms.JMSException
createTextMessage in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic boolean getTransacted()
throws javax.jms.JMSException
getTransacted in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic int getAcknowledgeMode()
throws javax.jms.JMSException
getAcknowledgeMode in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic boolean isXA()
public void commit()
throws javax.jms.JMSException
commit in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic void rollback()
throws javax.jms.JMSException
rollback in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic void close()
throws javax.jms.JMSException
close in interface AutoCloseableclose in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic void recover()
throws javax.jms.JMSException
recover in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageListener getMessageListener()
throws javax.jms.JMSException
getMessageListener in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic void setMessageListener(javax.jms.MessageListener listener)
throws javax.jms.JMSException
setMessageListener in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic void run()
public javax.jms.MessageProducer createProducer(javax.jms.Destination destination)
throws javax.jms.JMSException
createProducer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination)
throws javax.jms.JMSException
createConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination,
String messageSelector)
throws javax.jms.JMSException
createConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.Queue createQueue(String queueName) throws javax.jms.JMSException
createQueue in interface javax.jms.QueueSessioncreateQueue in interface javax.jms.Sessionjavax.jms.JMSExceptionprotected javax.jms.Queue internalCreateQueue(String queueName) throws ActiveMQException, javax.jms.JMSException
ActiveMQExceptionjavax.jms.JMSExceptionprotected ActiveMQQueue internalCreateQueueCompatibility(String queueName) throws ActiveMQException, javax.jms.JMSException
ActiveMQExceptionjavax.jms.JMSExceptionpublic javax.jms.Topic createTopic(String topicName) throws javax.jms.JMSException
createTopic in interface javax.jms.SessioncreateTopic in interface javax.jms.TopicSessionjavax.jms.JMSExceptionprotected javax.jms.Topic internalCreateTopic(String topicName, boolean retry) throws ActiveMQException, javax.jms.JMSException
ActiveMQExceptionjavax.jms.JMSExceptionpublic javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
String name)
throws javax.jms.JMSException
createDurableSubscriber in interface javax.jms.SessioncreateDurableSubscriber in interface javax.jms.TopicSessionjavax.jms.JMSExceptionpublic javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createDurableSubscriber in interface javax.jms.SessioncreateDurableSubscriber in interface javax.jms.TopicSessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName)
throws javax.jms.JMSException
createSharedConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic,
String name,
String messageSelector)
throws javax.jms.JMSException
createSharedConsumer in interface javax.jms.Sessiontopic - name - messageSelector - javax.jms.JMSExceptionpublic javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic,
String name)
throws javax.jms.JMSException
createDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic,
String name)
throws javax.jms.JMSException
createSharedDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector)
throws javax.jms.JMSException
createSharedDurableConsumer in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic String getDeserializationBlackList()
public String getDeserializationWhiteList()
public void ackAllConsumers()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
throws javax.jms.JMSException
createBrowser in interface javax.jms.QueueSessioncreateBrowser in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
String filterString)
throws javax.jms.JMSException
createBrowser in interface javax.jms.QueueSessioncreateBrowser in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.TemporaryQueue createTemporaryQueue()
throws javax.jms.JMSException
createTemporaryQueue in interface javax.jms.QueueSessioncreateTemporaryQueue in interface javax.jms.Sessionjavax.jms.JMSExceptionpublic javax.jms.TemporaryTopic createTemporaryTopic()
throws javax.jms.JMSException
createTemporaryTopic in interface javax.jms.SessioncreateTemporaryTopic in interface javax.jms.TopicSessionjavax.jms.JMSExceptionpublic void unsubscribe(String name) throws javax.jms.JMSException
unsubscribe in interface javax.jms.Sessionunsubscribe in interface javax.jms.TopicSessionjavax.jms.JMSExceptionpublic javax.jms.Session getSession()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic XAResource getXAResource()
public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
String messageSelector)
throws javax.jms.JMSException
createReceiver in interface javax.jms.QueueSessionjavax.jms.JMSExceptionpublic javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
throws javax.jms.JMSException
createReceiver in interface javax.jms.QueueSessionjavax.jms.JMSExceptionpublic javax.jms.QueueSender createSender(javax.jms.Queue queue)
throws javax.jms.JMSException
createSender in interface javax.jms.QueueSessionjavax.jms.JMSExceptionpublic javax.jms.QueueSession getQueueSession()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic javax.jms.TopicPublisher createPublisher(javax.jms.Topic topic)
throws javax.jms.JMSException
createPublisher in interface javax.jms.TopicSessionjavax.jms.JMSExceptionpublic javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic,
String messageSelector,
boolean noLocal)
throws javax.jms.JMSException
createSubscriber in interface javax.jms.TopicSessionjavax.jms.JMSExceptionpublic javax.jms.TopicSubscriber createSubscriber(javax.jms.Topic topic)
throws javax.jms.JMSException
createSubscriber in interface javax.jms.TopicSessionjavax.jms.JMSExceptionpublic javax.jms.TopicSession getTopicSession()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic ClientSession getCoreSession()
public boolean isRecoverCalled()
public void setRecoverCalled(boolean recoverCalled)
public void deleteTemporaryTopic(ActiveMQDestination tempTopic) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void deleteTemporaryQueue(ActiveMQDestination tempQueue) throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void start()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void stop()
throws javax.jms.JMSException
javax.jms.JMSExceptionpublic void removeConsumer(ActiveMQMessageConsumer consumer)
public boolean isEnable1xPrefixes()
public ActiveMQConnection getConnection()
Copyright © 2020 The Apache Software Foundation. All rights reserved.