Class PooledConnection

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

public class PooledConnection extends PooledObject<javax.jms.Connection> implements javax.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(javax.jms.Connection connection, AbstractPool<PooledObject<javax.jms.Connection>> connectionPool)
  • Method Details

    • of

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public String toString()
      Overrides:
      toString in class Object