Package io.micronaut.jms.pool
Class PooledSession
java.lang.Object
io.micronaut.jms.pool.PooledObject<jakarta.jms.Session>
io.micronaut.jms.pool.PooledSession
- All Implemented Interfaces:
jakarta.jms.Session
,AutoCloseable
,Runnable
Wrapper for
Session
that returns it to the pool with a call to
AutoCloseable.close()
.- Since:
- 1.0.0
- Author:
- Elliott Pope
-
Field Summary
Fields inherited from interface jakarta.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
-
Constructor Summary
ConstructorDescriptionPooledSession
(AbstractPool<PooledObject<jakarta.jms.Session>> pool, jakarta.jms.Session object, MessageProducerPool producerPool) -
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
jakarta.jms.QueueBrowser
createBrowser
(jakarta.jms.Queue queue) jakarta.jms.QueueBrowser
createBrowser
(jakarta.jms.Queue queue, String messageSelector) jakarta.jms.BytesMessage
jakarta.jms.MessageConsumer
createConsumer
(jakarta.jms.Destination destination) jakarta.jms.MessageConsumer
createConsumer
(jakarta.jms.Destination destination, String messageSelector) jakarta.jms.MessageConsumer
createConsumer
(jakarta.jms.Destination destination, String messageSelector, boolean noLocal) jakarta.jms.MessageConsumer
createDurableConsumer
(jakarta.jms.Topic topic, String name) jakarta.jms.MessageConsumer
createDurableConsumer
(jakarta.jms.Topic topic, String name, String messageSelector, boolean noLocal) jakarta.jms.TopicSubscriber
createDurableSubscriber
(jakarta.jms.Topic topic, String name) jakarta.jms.TopicSubscriber
createDurableSubscriber
(jakarta.jms.Topic topic, String name, String messageSelector, boolean noLocal) jakarta.jms.MapMessage
jakarta.jms.Message
jakarta.jms.ObjectMessage
jakarta.jms.ObjectMessage
createObjectMessage
(Serializable messageObject) jakarta.jms.MessageProducer
createProducer
(jakarta.jms.Destination destination) jakarta.jms.Queue
createQueue
(String queueName) jakarta.jms.MessageConsumer
createSharedConsumer
(jakarta.jms.Topic topic, String sharedSubscriptionName) jakarta.jms.MessageConsumer
createSharedConsumer
(jakarta.jms.Topic topic, String sharedSubscriptionName, String messageSelector) jakarta.jms.MessageConsumer
createSharedDurableConsumer
(jakarta.jms.Topic topic, String name) jakarta.jms.MessageConsumer
createSharedDurableConsumer
(jakarta.jms.Topic topic, String name, String messageSelector) jakarta.jms.StreamMessage
jakarta.jms.TemporaryQueue
jakarta.jms.TemporaryTopic
jakarta.jms.TextMessage
jakarta.jms.TextMessage
createTextMessage
(String text) jakarta.jms.Topic
createTopic
(String topicName) int
jakarta.jms.MessageListener
boolean
void
recover()
void
rollback()
void
run()
void
setMessageListener
(jakarta.jms.MessageListener listener) toString()
void
unsubscribe
(String name) Methods inherited from class io.micronaut.jms.pool.PooledObject
close, get
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface jakarta.jms.Session
close
-
Constructor Details
-
PooledSession
public PooledSession(AbstractPool<PooledObject<jakarta.jms.Session>> pool, jakarta.jms.Session object, MessageProducerPool producerPool)
-
-
Method Details
-
createBytesMessage
public jakarta.jms.BytesMessage createBytesMessage() throws jakarta.jms.JMSException- Specified by:
createBytesMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createMapMessage
public jakarta.jms.MapMessage createMapMessage() throws jakarta.jms.JMSException- Specified by:
createMapMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createMessage
public jakarta.jms.Message createMessage() throws jakarta.jms.JMSException- Specified by:
createMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createObjectMessage
public jakarta.jms.ObjectMessage createObjectMessage() throws jakarta.jms.JMSException- Specified by:
createObjectMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createObjectMessage
public jakarta.jms.ObjectMessage createObjectMessage(Serializable messageObject) throws jakarta.jms.JMSException - Specified by:
createObjectMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createStreamMessage
public jakarta.jms.StreamMessage createStreamMessage() throws jakarta.jms.JMSException- Specified by:
createStreamMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createTextMessage
public jakarta.jms.TextMessage createTextMessage() throws jakarta.jms.JMSException- Specified by:
createTextMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createTextMessage
- Specified by:
createTextMessage
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
getTransacted
public boolean getTransacted() throws jakarta.jms.JMSException- Specified by:
getTransacted
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
getAcknowledgeMode
public int getAcknowledgeMode() throws jakarta.jms.JMSException- Specified by:
getAcknowledgeMode
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
commit
public void commit() throws jakarta.jms.JMSException- Specified by:
commit
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
rollback
public void rollback() throws jakarta.jms.JMSException- Specified by:
rollback
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
recover
public void recover() throws jakarta.jms.JMSException- Specified by:
recover
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
getMessageListener
public jakarta.jms.MessageListener getMessageListener() throws jakarta.jms.JMSException- Specified by:
getMessageListener
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
setMessageListener
public void setMessageListener(jakarta.jms.MessageListener listener) throws jakarta.jms.JMSException - Specified by:
setMessageListener
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
run
public void run() -
createProducer
public jakarta.jms.MessageProducer createProducer(jakarta.jms.Destination destination) throws jakarta.jms.JMSException - Specified by:
createProducer
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createConsumer
public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Destination destination) throws jakarta.jms.JMSException - Specified by:
createConsumer
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createConsumer
public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Destination destination, String messageSelector) throws jakarta.jms.JMSException - Specified by:
createConsumer
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createConsumer
public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Destination destination, String messageSelector, boolean noLocal) throws jakarta.jms.JMSException - Specified by:
createConsumer
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createQueue
- Specified by:
createQueue
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createTopic
- Specified by:
createTopic
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createDurableSubscriber
public jakarta.jms.TopicSubscriber createDurableSubscriber(jakarta.jms.Topic topic, String name) throws jakarta.jms.JMSException - Specified by:
createDurableSubscriber
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createDurableSubscriber
public jakarta.jms.TopicSubscriber createDurableSubscriber(jakarta.jms.Topic topic, String name, String messageSelector, boolean noLocal) throws jakarta.jms.JMSException - Specified by:
createDurableSubscriber
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createDurableConsumer
public jakarta.jms.MessageConsumer createDurableConsumer(jakarta.jms.Topic topic, String name) throws jakarta.jms.JMSException - Specified by:
createDurableConsumer
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createDurableConsumer
public jakarta.jms.MessageConsumer createDurableConsumer(jakarta.jms.Topic topic, String name, String messageSelector, boolean noLocal) throws jakarta.jms.JMSException - Specified by:
createDurableConsumer
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createBrowser
public jakarta.jms.QueueBrowser createBrowser(jakarta.jms.Queue queue) throws jakarta.jms.JMSException - Specified by:
createBrowser
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createBrowser
public jakarta.jms.QueueBrowser createBrowser(jakarta.jms.Queue queue, String messageSelector) throws jakarta.jms.JMSException - Specified by:
createBrowser
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createTemporaryQueue
public jakarta.jms.TemporaryQueue createTemporaryQueue() throws jakarta.jms.JMSException- Specified by:
createTemporaryQueue
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
createTemporaryTopic
public jakarta.jms.TemporaryTopic createTemporaryTopic() throws jakarta.jms.JMSException- Specified by:
createTemporaryTopic
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
unsubscribe
- Specified by:
unsubscribe
in interfacejakarta.jms.Session
- Throws:
jakarta.jms.JMSException
-
toString
-