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

public class PooledSession extends PooledObject<jakarta.jms.Session> implements jakarta.jms.Session
Wrapper for Session that returns it to the pool with a call to AutoCloseable.close().
Since:
1.0.0
Author:
Elliott Pope
  • Constructor Details

  • Method Details

    • createBytesMessage

      public jakarta.jms.BytesMessage createBytesMessage() throws jakarta.jms.JMSException
      Specified by:
      createBytesMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createMapMessage

      public jakarta.jms.MapMessage createMapMessage() throws jakarta.jms.JMSException
      Specified by:
      createMapMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createMessage

      public jakarta.jms.Message createMessage() throws jakarta.jms.JMSException
      Specified by:
      createMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createObjectMessage

      public jakarta.jms.ObjectMessage createObjectMessage() throws jakarta.jms.JMSException
      Specified by:
      createObjectMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createObjectMessage

      public jakarta.jms.ObjectMessage createObjectMessage(Serializable messageObject) throws jakarta.jms.JMSException
      Specified by:
      createObjectMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createStreamMessage

      public jakarta.jms.StreamMessage createStreamMessage() throws jakarta.jms.JMSException
      Specified by:
      createStreamMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createTextMessage

      public jakarta.jms.TextMessage createTextMessage() throws jakarta.jms.JMSException
      Specified by:
      createTextMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createTextMessage

      public jakarta.jms.TextMessage createTextMessage(String text) throws jakarta.jms.JMSException
      Specified by:
      createTextMessage in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • getTransacted

      public boolean getTransacted() throws jakarta.jms.JMSException
      Specified by:
      getTransacted in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • getAcknowledgeMode

      public int getAcknowledgeMode() throws jakarta.jms.JMSException
      Specified by:
      getAcknowledgeMode in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • commit

      public void commit() throws jakarta.jms.JMSException
      Specified by:
      commit in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • rollback

      public void rollback() throws jakarta.jms.JMSException
      Specified by:
      rollback in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • recover

      public void recover() throws jakarta.jms.JMSException
      Specified by:
      recover in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • getMessageListener

      public jakarta.jms.MessageListener getMessageListener() throws jakarta.jms.JMSException
      Specified by:
      getMessageListener in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • setMessageListener

      public void setMessageListener(jakarta.jms.MessageListener listener) throws jakarta.jms.JMSException
      Specified by:
      setMessageListener in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • run

      public void run()
      Specified by:
      run in interface Runnable
      Specified by:
      run in interface jakarta.jms.Session
    • createProducer

      public jakarta.jms.MessageProducer createProducer(jakarta.jms.Destination destination) throws jakarta.jms.JMSException
      Specified by:
      createProducer in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createConsumer

      public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Destination destination) throws jakarta.jms.JMSException
      Specified by:
      createConsumer in interface jakarta.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 interface jakarta.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 interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createSharedConsumer

      public jakarta.jms.MessageConsumer createSharedConsumer(jakarta.jms.Topic topic, String sharedSubscriptionName) throws jakarta.jms.JMSException
      Specified by:
      createSharedConsumer in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createSharedConsumer

      public jakarta.jms.MessageConsumer createSharedConsumer(jakarta.jms.Topic topic, String sharedSubscriptionName, String messageSelector) throws jakarta.jms.JMSException
      Specified by:
      createSharedConsumer in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createQueue

      public jakarta.jms.Queue createQueue(String queueName) throws jakarta.jms.JMSException
      Specified by:
      createQueue in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createTopic

      public jakarta.jms.Topic createTopic(String topicName) throws jakarta.jms.JMSException
      Specified by:
      createTopic in interface jakarta.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 interface jakarta.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 interface jakarta.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 interface jakarta.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 interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createSharedDurableConsumer

      public jakarta.jms.MessageConsumer createSharedDurableConsumer(jakarta.jms.Topic topic, String name) throws jakarta.jms.JMSException
      Specified by:
      createSharedDurableConsumer in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createSharedDurableConsumer

      public jakarta.jms.MessageConsumer createSharedDurableConsumer(jakarta.jms.Topic topic, String name, String messageSelector) throws jakarta.jms.JMSException
      Specified by:
      createSharedDurableConsumer in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createBrowser

      public jakarta.jms.QueueBrowser createBrowser(jakarta.jms.Queue queue) throws jakarta.jms.JMSException
      Specified by:
      createBrowser in interface jakarta.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 interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createTemporaryQueue

      public jakarta.jms.TemporaryQueue createTemporaryQueue() throws jakarta.jms.JMSException
      Specified by:
      createTemporaryQueue in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • createTemporaryTopic

      public jakarta.jms.TemporaryTopic createTemporaryTopic() throws jakarta.jms.JMSException
      Specified by:
      createTemporaryTopic in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • unsubscribe

      public void unsubscribe(String name) throws jakarta.jms.JMSException
      Specified by:
      unsubscribe in interface jakarta.jms.Session
      Throws:
      jakarta.jms.JMSException
    • toString

      public String toString()
      Overrides:
      toString in class Object