public class PooledConnection extends PooledObject<javax.jms.Connection> implements javax.jms.Connection
Connection
that returns it to the
JMSConnectionPool
with a call to AutoCloseable.close()
.AutoCloseable
,
JMSConnectionPool
Constructor and Description |
---|
PooledConnection(javax.jms.Connection connection,
AbstractPool<PooledObject<javax.jms.Connection>> connectionPool) |
Modifier and Type | Method and Description |
---|---|
javax.jms.ConnectionConsumer |
createConnectionConsumer(javax.jms.Destination destination,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
javax.jms.ConnectionConsumer |
createDurableConnectionConsumer(javax.jms.Topic topic,
java.lang.String subscriptionName,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
javax.jms.Session |
createSession() |
javax.jms.Session |
createSession(boolean transacted,
int acknowledgeMode) |
javax.jms.Session |
createSession(int sessionMode) |
javax.jms.ConnectionConsumer |
createSharedConnectionConsumer(javax.jms.Topic topic,
java.lang.String subscriptionName,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
javax.jms.ConnectionConsumer |
createSharedDurableConnectionConsumer(javax.jms.Topic topic,
java.lang.String subscriptionName,
java.lang.String messageSelector,
javax.jms.ServerSessionPool sessionPool,
int maxMessages) |
java.lang.String |
getClientID() |
javax.jms.ExceptionListener |
getExceptionListener() |
javax.jms.ConnectionMetaData |
getMetaData() |
static PooledConnection |
of(PooledObject<javax.jms.Connection> pooledObject) |
void |
setClientID(java.lang.String clientID) |
void |
setExceptionListener(javax.jms.ExceptionListener listener) |
void |
start() |
void |
stop() |
java.lang.String |
toString() |
close, get
public PooledConnection(javax.jms.Connection connection, AbstractPool<PooledObject<javax.jms.Connection>> connectionPool)
public static PooledConnection of(PooledObject<javax.jms.Connection> pooledObject)
public javax.jms.Session createSession(boolean transacted, int acknowledgeMode) throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.Session createSession(int sessionMode) throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.Session createSession() throws javax.jms.JMSException
createSession
in interface javax.jms.Connection
javax.jms.JMSException
public java.lang.String getClientID() throws javax.jms.JMSException
getClientID
in interface javax.jms.Connection
javax.jms.JMSException
public void setClientID(java.lang.String clientID) throws javax.jms.JMSException
setClientID
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionMetaData getMetaData() throws javax.jms.JMSException
getMetaData
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ExceptionListener getExceptionListener() throws javax.jms.JMSException
getExceptionListener
in interface javax.jms.Connection
javax.jms.JMSException
public void setExceptionListener(javax.jms.ExceptionListener listener) throws javax.jms.JMSException
setExceptionListener
in interface javax.jms.Connection
javax.jms.JMSException
public void start() throws javax.jms.JMSException
start
in interface javax.jms.Connection
javax.jms.JMSException
public void stop() throws javax.jms.JMSException
stop
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createConnectionConsumer(javax.jms.Destination destination, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createSharedConnectionConsumer(javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createSharedConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createDurableConnectionConsumer(javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createDurableConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public javax.jms.ConnectionConsumer createSharedDurableConnectionConsumer(javax.jms.Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, javax.jms.ServerSessionPool sessionPool, int maxMessages) throws javax.jms.JMSException
createSharedDurableConnectionConsumer
in interface javax.jms.Connection
javax.jms.JMSException
public java.lang.String toString()
toString
in class java.lang.Object