Package io.micronaut.jms.pool
Class PooledSession
java.lang.Object
io.micronaut.jms.pool.PooledObject<javax.jms.Session>
io.micronaut.jms.pool.PooledSession
- All Implemented Interfaces:
AutoCloseable
,Runnable
,javax.jms.Session
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 javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
-
Constructor Summary
ConstructorDescriptionPooledSession
(AbstractPool<PooledObject<javax.jms.Session>> pool, javax.jms.Session object, MessageProducerPool producerPool) -
Method Summary
Modifier and TypeMethodDescriptionvoid
commit()
javax.jms.QueueBrowser
createBrowser
(javax.jms.Queue queue) javax.jms.QueueBrowser
createBrowser
(javax.jms.Queue queue, String messageSelector) javax.jms.BytesMessage
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
javax.jms.Message
javax.jms.ObjectMessage
javax.jms.ObjectMessage
createObjectMessage
(Serializable messageObject) javax.jms.MessageProducer
createProducer
(javax.jms.Destination destination) javax.jms.Queue
createQueue
(String queueName) javax.jms.MessageConsumer
createSharedConsumer
(javax.jms.Topic topic, String sharedSubscriptionName) javax.jms.MessageConsumer
createSharedConsumer
(javax.jms.Topic topic, String sharedSubscriptionName, String messageSelector) 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
javax.jms.TemporaryQueue
javax.jms.TemporaryTopic
javax.jms.TextMessage
javax.jms.TextMessage
createTextMessage
(String text) javax.jms.Topic
createTopic
(String topicName) int
javax.jms.MessageListener
boolean
void
recover()
void
rollback()
void
run()
void
setMessageListener
(javax.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 javax.jms.Session
close
-
Constructor Details
-
PooledSession
public PooledSession(AbstractPool<PooledObject<javax.jms.Session>> pool, javax.jms.Session object, MessageProducerPool producerPool)
-
-
Method Details
-
createBytesMessage
public javax.jms.BytesMessage createBytesMessage() throws javax.jms.JMSException- Specified by:
createBytesMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createMapMessage
public javax.jms.MapMessage createMapMessage() throws javax.jms.JMSException- Specified by:
createMapMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createMessage
public javax.jms.Message createMessage() throws javax.jms.JMSException- Specified by:
createMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createObjectMessage
public javax.jms.ObjectMessage createObjectMessage() throws javax.jms.JMSException- Specified by:
createObjectMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createObjectMessage
public javax.jms.ObjectMessage createObjectMessage(Serializable messageObject) throws javax.jms.JMSException - Specified by:
createObjectMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createStreamMessage
public javax.jms.StreamMessage createStreamMessage() throws javax.jms.JMSException- Specified by:
createStreamMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createTextMessage
public javax.jms.TextMessage createTextMessage() throws javax.jms.JMSException- Specified by:
createTextMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createTextMessage
- Specified by:
createTextMessage
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
getTransacted
public boolean getTransacted() throws javax.jms.JMSException- Specified by:
getTransacted
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
getAcknowledgeMode
public int getAcknowledgeMode() throws javax.jms.JMSException- Specified by:
getAcknowledgeMode
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
commit
public void commit() throws javax.jms.JMSException- Specified by:
commit
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
rollback
public void rollback() throws javax.jms.JMSException- Specified by:
rollback
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
recover
public void recover() throws javax.jms.JMSException- Specified by:
recover
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
getMessageListener
public javax.jms.MessageListener getMessageListener() throws javax.jms.JMSException- Specified by:
getMessageListener
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
setMessageListener
public void setMessageListener(javax.jms.MessageListener listener) throws javax.jms.JMSException - Specified by:
setMessageListener
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
run
public void run() -
createProducer
public javax.jms.MessageProducer createProducer(javax.jms.Destination destination) throws javax.jms.JMSException - Specified by:
createProducer
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createConsumer
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination) throws javax.jms.JMSException - Specified by:
createConsumer
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createConsumer
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, String messageSelector) throws javax.jms.JMSException - Specified by:
createConsumer
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createConsumer
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, String messageSelector, boolean noLocal) throws javax.jms.JMSException - Specified by:
createConsumer
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createQueue
- Specified by:
createQueue
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createTopic
- Specified by:
createTopic
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createDurableSubscriber
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, String name) throws javax.jms.JMSException - Specified by:
createDurableSubscriber
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createDurableSubscriber
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, String name, String messageSelector, boolean noLocal) throws javax.jms.JMSException - Specified by:
createDurableSubscriber
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createDurableConsumer
public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, String name) throws javax.jms.JMSException - Specified by:
createDurableConsumer
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createDurableConsumer
public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, String name, String messageSelector, boolean noLocal) throws javax.jms.JMSException - Specified by:
createDurableConsumer
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createBrowser
public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue) throws javax.jms.JMSException - Specified by:
createBrowser
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createBrowser
public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, String messageSelector) throws javax.jms.JMSException - Specified by:
createBrowser
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createTemporaryQueue
public javax.jms.TemporaryQueue createTemporaryQueue() throws javax.jms.JMSException- Specified by:
createTemporaryQueue
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
createTemporaryTopic
public javax.jms.TemporaryTopic createTemporaryTopic() throws javax.jms.JMSException- Specified by:
createTemporaryTopic
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
unsubscribe
- Specified by:
unsubscribe
in interfacejavax.jms.Session
- Throws:
javax.jms.JMSException
-
toString
-