Class PooledConnection

java.lang.Object
io.micronaut.jms.pool.PooledObject<jakarta.jms.Connection>
io.micronaut.jms.pool.PooledConnection
All Implemented Interfaces:
jakarta.jms.Connection, AutoCloseable

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

    • PooledConnection

      public PooledConnection(jakarta.jms.Connection connection, AbstractPool<PooledObject<jakarta.jms.Connection>> connectionPool)
  • Method Details

    • of

      public static PooledConnection of(PooledObject<jakarta.jms.Connection> pooledObject)
    • createSession

      public jakarta.jms.Session createSession(boolean transacted, int acknowledgeMode) throws jakarta.jms.JMSException
      Specified by:
      createSession in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • createSession

      public jakarta.jms.Session createSession(int sessionMode) throws jakarta.jms.JMSException
      Specified by:
      createSession in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • createSession

      public jakarta.jms.Session createSession() throws jakarta.jms.JMSException
      Specified by:
      createSession in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • getClientID

      public String getClientID() throws jakarta.jms.JMSException
      Specified by:
      getClientID in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • setClientID

      public void setClientID(String clientID) throws jakarta.jms.JMSException
      Specified by:
      setClientID in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • getMetaData

      public jakarta.jms.ConnectionMetaData getMetaData() throws jakarta.jms.JMSException
      Specified by:
      getMetaData in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • getExceptionListener

      public jakarta.jms.ExceptionListener getExceptionListener() throws jakarta.jms.JMSException
      Specified by:
      getExceptionListener in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • setExceptionListener

      public void setExceptionListener(jakarta.jms.ExceptionListener listener) throws jakarta.jms.JMSException
      Specified by:
      setExceptionListener in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • start

      public void start() throws jakarta.jms.JMSException
      Specified by:
      start in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • stop

      public void stop() throws jakarta.jms.JMSException
      Specified by:
      stop in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • createConnectionConsumer

      public jakarta.jms.ConnectionConsumer createConnectionConsumer(jakarta.jms.Destination destination, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException
      Specified by:
      createConnectionConsumer in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • createSharedConnectionConsumer

      public jakarta.jms.ConnectionConsumer createSharedConnectionConsumer(jakarta.jms.Topic topic, String subscriptionName, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException
      Specified by:
      createSharedConnectionConsumer in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • createDurableConnectionConsumer

      public jakarta.jms.ConnectionConsumer createDurableConnectionConsumer(jakarta.jms.Topic topic, String subscriptionName, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException
      Specified by:
      createDurableConnectionConsumer in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • createSharedDurableConnectionConsumer

      public jakarta.jms.ConnectionConsumer createSharedDurableConnectionConsumer(jakarta.jms.Topic topic, String subscriptionName, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) throws jakarta.jms.JMSException
      Specified by:
      createSharedDurableConnectionConsumer in interface jakarta.jms.Connection
      Throws:
      jakarta.jms.JMSException
    • toString

      public String toString()
      Overrides:
      toString in class Object