public class PooledSession extends PooledObject<javax.jms.Session> implements javax.jms.Session
Session
that returns it to the pool with a call to
AutoCloseable.close()
.Constructor and Description |
---|
PooledSession(AbstractPool<PooledObject<javax.jms.Session>> pool,
javax.jms.Session object,
MessageProducerPool producerPool) |
Modifier and Type | Method and Description |
---|---|
void |
commit() |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue) |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue,
java.lang.String messageSelector) |
javax.jms.BytesMessage |
createBytesMessage() |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination) |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
java.lang.String messageSelector) |
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination destination,
java.lang.String messageSelector,
boolean noLocal) |
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
java.lang.String name) |
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
java.lang.String name,
java.lang.String messageSelector,
boolean noLocal) |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
java.lang.String name) |
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
java.lang.String name,
java.lang.String messageSelector,
boolean noLocal) |
javax.jms.MapMessage |
createMapMessage() |
javax.jms.Message |
createMessage() |
javax.jms.ObjectMessage |
createObjectMessage() |
javax.jms.ObjectMessage |
createObjectMessage(java.io.Serializable messageObject) |
javax.jms.MessageProducer |
createProducer(javax.jms.Destination destination) |
javax.jms.Queue |
createQueue(java.lang.String queueName) |
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
java.lang.String sharedSubscriptionName) |
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
java.lang.String sharedSubscriptionName,
java.lang.String messageSelector) |
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
java.lang.String name) |
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
java.lang.String name,
java.lang.String messageSelector) |
javax.jms.StreamMessage |
createStreamMessage() |
javax.jms.TemporaryQueue |
createTemporaryQueue() |
javax.jms.TemporaryTopic |
createTemporaryTopic() |
javax.jms.TextMessage |
createTextMessage() |
javax.jms.TextMessage |
createTextMessage(java.lang.String text) |
javax.jms.Topic |
createTopic(java.lang.String topicName) |
int |
getAcknowledgeMode() |
javax.jms.MessageListener |
getMessageListener() |
boolean |
getTransacted() |
void |
recover() |
void |
rollback() |
void |
run() |
void |
setMessageListener(javax.jms.MessageListener listener) |
java.lang.String |
toString() |
void |
unsubscribe(java.lang.String name) |
close, get
public PooledSession(AbstractPool<PooledObject<javax.jms.Session>> pool, javax.jms.Session object, MessageProducerPool producerPool)
public javax.jms.BytesMessage createBytesMessage() throws javax.jms.JMSException
createBytesMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MapMessage createMapMessage() throws javax.jms.JMSException
createMapMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Message createMessage() throws javax.jms.JMSException
createMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.ObjectMessage createObjectMessage() throws javax.jms.JMSException
createObjectMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.ObjectMessage createObjectMessage(java.io.Serializable messageObject) throws javax.jms.JMSException
createObjectMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.StreamMessage createStreamMessage() throws javax.jms.JMSException
createStreamMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TextMessage createTextMessage() throws javax.jms.JMSException
createTextMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TextMessage createTextMessage(java.lang.String text) throws javax.jms.JMSException
createTextMessage
in interface javax.jms.Session
javax.jms.JMSException
public boolean getTransacted() throws javax.jms.JMSException
getTransacted
in interface javax.jms.Session
javax.jms.JMSException
public int getAcknowledgeMode() throws javax.jms.JMSException
getAcknowledgeMode
in interface javax.jms.Session
javax.jms.JMSException
public void commit() throws javax.jms.JMSException
commit
in interface javax.jms.Session
javax.jms.JMSException
public void rollback() throws javax.jms.JMSException
rollback
in interface javax.jms.Session
javax.jms.JMSException
public void recover() throws javax.jms.JMSException
recover
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageListener getMessageListener() throws javax.jms.JMSException
getMessageListener
in interface javax.jms.Session
javax.jms.JMSException
public void setMessageListener(javax.jms.MessageListener listener) throws javax.jms.JMSException
setMessageListener
in interface javax.jms.Session
javax.jms.JMSException
public void run()
run
in interface java.lang.Runnable
run
in interface javax.jms.Session
public javax.jms.MessageProducer createProducer(javax.jms.Destination destination) throws javax.jms.JMSException
createProducer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, java.lang.String messageSelector) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination destination, java.lang.String messageSelector, boolean noLocal) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic, java.lang.String sharedSubscriptionName) throws javax.jms.JMSException
createSharedConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic, java.lang.String sharedSubscriptionName, java.lang.String messageSelector) throws javax.jms.JMSException
createSharedConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Queue createQueue(java.lang.String queueName) throws javax.jms.JMSException
createQueue
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Topic createTopic(java.lang.String topicName) throws javax.jms.JMSException
createTopic
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, java.lang.String name, java.lang.String messageSelector, boolean noLocal) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, java.lang.String name) throws javax.jms.JMSException
createDurableConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, java.lang.String name, java.lang.String messageSelector, boolean noLocal) throws javax.jms.JMSException
createDurableConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic, java.lang.String name) throws javax.jms.JMSException
createSharedDurableConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic, java.lang.String name, java.lang.String messageSelector) throws javax.jms.JMSException
createSharedDurableConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue) throws javax.jms.JMSException
createBrowser
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String messageSelector) throws javax.jms.JMSException
createBrowser
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TemporaryQueue createTemporaryQueue() throws javax.jms.JMSException
createTemporaryQueue
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TemporaryTopic createTemporaryTopic() throws javax.jms.JMSException
createTemporaryTopic
in interface javax.jms.Session
javax.jms.JMSException
public void unsubscribe(java.lang.String name) throws javax.jms.JMSException
unsubscribe
in interface javax.jms.Session
javax.jms.JMSException
public java.lang.String toString()
toString
in class java.lang.Object