Package io.micronaut.jms.pool
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 Summary
ConstructorDescriptionPooledConnection
(jakarta.jms.Connection connection, AbstractPool<PooledObject<jakarta.jms.Connection>> connectionPool) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.jms.ConnectionConsumer
createConnectionConsumer
(jakarta.jms.Destination destination, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) jakarta.jms.ConnectionConsumer
createDurableConnectionConsumer
(jakarta.jms.Topic topic, String subscriptionName, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) jakarta.jms.Session
jakarta.jms.Session
createSession
(boolean transacted, int acknowledgeMode) jakarta.jms.Session
createSession
(int sessionMode) jakarta.jms.ConnectionConsumer
createSharedConnectionConsumer
(jakarta.jms.Topic topic, String subscriptionName, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) jakarta.jms.ConnectionConsumer
createSharedDurableConnectionConsumer
(jakarta.jms.Topic topic, String subscriptionName, String messageSelector, jakarta.jms.ServerSessionPool sessionPool, int maxMessages) jakarta.jms.ExceptionListener
jakarta.jms.ConnectionMetaData
static PooledConnection
of
(PooledObject<jakarta.jms.Connection> pooledObject) void
setClientID
(String clientID) void
setExceptionListener
(jakarta.jms.ExceptionListener listener) void
start()
void
stop()
toString()
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.Connection
close
-
Constructor Details
-
PooledConnection
public PooledConnection(jakarta.jms.Connection connection, AbstractPool<PooledObject<jakarta.jms.Connection>> connectionPool)
-
-
Method Details
-
of
-
createSession
public jakarta.jms.Session createSession(boolean transacted, int acknowledgeMode) throws jakarta.jms.JMSException - Specified by:
createSession
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
createSession
public jakarta.jms.Session createSession(int sessionMode) throws jakarta.jms.JMSException - Specified by:
createSession
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
createSession
public jakarta.jms.Session createSession() throws jakarta.jms.JMSException- Specified by:
createSession
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
getClientID
- Specified by:
getClientID
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
setClientID
- Specified by:
setClientID
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
getMetaData
public jakarta.jms.ConnectionMetaData getMetaData() throws jakarta.jms.JMSException- Specified by:
getMetaData
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
getExceptionListener
public jakarta.jms.ExceptionListener getExceptionListener() throws jakarta.jms.JMSException- Specified by:
getExceptionListener
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
setExceptionListener
public void setExceptionListener(jakarta.jms.ExceptionListener listener) throws jakarta.jms.JMSException - Specified by:
setExceptionListener
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
start
public void start() throws jakarta.jms.JMSException- Specified by:
start
in interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
stop
public void stop() throws jakarta.jms.JMSException- Specified by:
stop
in interfacejakarta.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 interfacejakarta.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 interfacejakarta.jms.Connection
- Throws:
jakarta.jms.JMSException
-
toString
-