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