public class OutboundSession extends Object implements jakarta.jms.Session
OutboundSession
instance wraps a JMS session (XA or not)
for a component involved in outbound messaging.Modifier and Type | Field and Description |
---|---|
protected OutboundConnection |
cnx
The
OutboundConnection the session belongs to. |
static Logger |
logger |
(package private) jakarta.jms.Session |
sess
The wrapped JMS session.
|
(package private) boolean |
started
true if the session is started. |
protected boolean |
transacted |
(package private) boolean |
valid
true if this "handle" is valid. |
Constructor and Description |
---|
OutboundSession(jakarta.jms.Session sess,
OutboundConnection cnx)
Constructs an
OutboundSession instance. |
OutboundSession(jakarta.jms.Session sess,
OutboundConnection cnx,
boolean transacted)
Constructs an
OutboundSession instance. |
Modifier and Type | Method and Description |
---|---|
(package private) void |
checkValidity()
Checks the validity of the session.
|
void |
close()
In Java EE, closing of the session occurs while closing
the component's connection.
|
void |
commit()
Forbidden call on a component's outbound session, throws a
IllegalStateException instance. |
jakarta.jms.QueueBrowser |
createBrowser(jakarta.jms.Queue queue)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.QueueBrowser |
createBrowser(jakarta.jms.Queue queue,
String selector)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.BytesMessage |
createBytesMessage()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createConsumer(jakarta.jms.Destination dest)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createConsumer(jakarta.jms.Destination dest,
String selector)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createConsumer(jakarta.jms.Destination dest,
String selector,
boolean noLocal)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createDurableConsumer(jakarta.jms.Topic topic,
String name)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createDurableConsumer(jakarta.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.TopicSubscriber |
createDurableSubscriber(jakarta.jms.Topic topic,
String name)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.TopicSubscriber |
createDurableSubscriber(jakarta.jms.Topic topic,
String name,
String selector,
boolean noLocal)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MapMessage |
createMapMessage()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.Message |
createMessage()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.ObjectMessage |
createObjectMessage()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.ObjectMessage |
createObjectMessage(Serializable obj)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageProducer |
createProducer(jakarta.jms.Destination dest)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.Queue |
createQueue(String queueName)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createSharedConsumer(jakarta.jms.Topic topic,
String sharedSubscriptionName)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createSharedConsumer(jakarta.jms.Topic topic,
String sharedSubscriptionName,
String messageSelector) |
jakarta.jms.MessageConsumer |
createSharedDurableConsumer(jakarta.jms.Topic topic,
String name)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageConsumer |
createSharedDurableConsumer(jakarta.jms.Topic topic,
String name,
String messageSelector)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.StreamMessage |
createStreamMessage()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.TemporaryQueue |
createTemporaryQueue()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.TemporaryTopic |
createTemporaryTopic()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.TextMessage |
createTextMessage()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.TextMessage |
createTextMessage(String text)
Delegates the call to the wrapped JMS session.
|
jakarta.jms.Topic |
createTopic(String topicName)
Delegates the call to the wrapped JMS session.
|
int |
getAcknowledgeMode()
Delegates the call to the wrapped JMS session.
|
jakarta.jms.MessageListener |
getMessageListener()
Forbidden call on a component's outbound session, throws a
IllegalStateException instance. |
boolean |
getTransacted()
Delegates the call to the wrapped JMS session.
|
boolean |
isStarted()
return started value.
|
void |
recover()
Delegates the call to the wrapped JMS session.
|
void |
rollback()
Forbidden call on a component's outbound session, throws a
IllegalStateException instance. |
void |
run()
Method never used by a component, does nothing.
|
void |
setMessageListener(jakarta.jms.MessageListener messageListener)
Forbidden call on a component's outbound session, throws a
IllegalStateException instance. |
(package private) void |
start()
set started = true
|
String |
toString() |
void |
unsubscribe(String name)
Delegates the call to the wrapped JMS session.
|
public static Logger logger
protected OutboundConnection cnx
OutboundConnection
the session belongs to.jakarta.jms.Session sess
boolean valid
true
if this "handle" is valid.boolean started
true
if the session is started.protected boolean transacted
OutboundSession(jakarta.jms.Session sess, OutboundConnection cnx)
OutboundSession
instance.OutboundSession(jakarta.jms.Session sess, OutboundConnection cnx, boolean transacted)
OutboundSession
instance.public boolean isStarted()
void start()
void checkValidity() throws jakarta.jms.IllegalStateException
jakarta.jms.IllegalStateException
public int getAcknowledgeMode() throws jakarta.jms.JMSException
getAcknowledgeMode
in interface jakarta.jms.Session
jakarta.jms.JMSException
public boolean getTransacted() throws jakarta.jms.JMSException
getTransacted
in interface jakarta.jms.Session
jakarta.jms.JMSException
public void setMessageListener(jakarta.jms.MessageListener messageListener) throws jakarta.jms.JMSException
IllegalStateException
instance.setMessageListener
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageListener getMessageListener() throws jakarta.jms.JMSException
IllegalStateException
instance.getMessageListener
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.Message createMessage() throws jakarta.jms.JMSException
createMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.TextMessage createTextMessage() throws jakarta.jms.JMSException
createTextMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.TextMessage createTextMessage(String text) throws jakarta.jms.JMSException
createTextMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.BytesMessage createBytesMessage() throws jakarta.jms.JMSException
createBytesMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MapMessage createMapMessage() throws jakarta.jms.JMSException
createMapMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.ObjectMessage createObjectMessage() throws jakarta.jms.JMSException
createObjectMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.ObjectMessage createObjectMessage(Serializable obj) throws jakarta.jms.JMSException
createObjectMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.StreamMessage createStreamMessage() throws jakarta.jms.JMSException
createStreamMessage
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.QueueBrowser createBrowser(jakarta.jms.Queue queue, String selector) throws jakarta.jms.JMSException
createBrowser
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.QueueBrowser createBrowser(jakarta.jms.Queue queue) throws jakarta.jms.JMSException
createBrowser
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageProducer createProducer(jakarta.jms.Destination dest) throws jakarta.jms.JMSException
createProducer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Destination dest, String selector, boolean noLocal) throws jakarta.jms.JMSException
createConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Destination dest, String selector) throws jakarta.jms.JMSException
createConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createConsumer(jakarta.jms.Destination dest) throws jakarta.jms.JMSException
createConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.TopicSubscriber createDurableSubscriber(jakarta.jms.Topic topic, String name, String selector, boolean noLocal) throws jakarta.jms.JMSException
createDurableSubscriber
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.TopicSubscriber createDurableSubscriber(jakarta.jms.Topic topic, String name) throws jakarta.jms.JMSException
createDurableSubscriber
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.Queue createQueue(String queueName) throws jakarta.jms.JMSException
createQueue
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.Topic createTopic(String topicName) throws jakarta.jms.JMSException
createTopic
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.TemporaryQueue createTemporaryQueue() throws jakarta.jms.JMSException
createTemporaryQueue
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.TemporaryTopic createTemporaryTopic() throws jakarta.jms.JMSException
createTemporaryTopic
in interface jakarta.jms.Session
jakarta.jms.JMSException
public void run()
public void commit() throws jakarta.jms.JMSException
IllegalStateException
instance.commit
in interface jakarta.jms.Session
jakarta.jms.JMSException
public void rollback() throws jakarta.jms.JMSException
IllegalStateException
instance.rollback
in interface jakarta.jms.Session
jakarta.jms.JMSException
public void recover() throws jakarta.jms.JMSException
recover
in interface jakarta.jms.Session
jakarta.jms.JMSException
public void unsubscribe(String name) throws jakarta.jms.JMSException
unsubscribe
in interface jakarta.jms.Session
jakarta.jms.JMSException
public void close() throws jakarta.jms.JMSException
close
in interface jakarta.jms.Session
close
in interface AutoCloseable
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createSharedConsumer(jakarta.jms.Topic topic, String sharedSubscriptionName) throws jakarta.jms.JMSException
createSharedConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createSharedConsumer(jakarta.jms.Topic topic, String sharedSubscriptionName, String messageSelector) throws jakarta.jms.JMSException
createSharedConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createDurableConsumer(jakarta.jms.Topic topic, String name) throws jakarta.jms.JMSException
createDurableConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createDurableConsumer(jakarta.jms.Topic topic, String name, String messageSelector, boolean noLocal) throws jakarta.jms.JMSException
createDurableConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createSharedDurableConsumer(jakarta.jms.Topic topic, String name) throws jakarta.jms.JMSException
createSharedDurableConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
public jakarta.jms.MessageConsumer createSharedDurableConsumer(jakarta.jms.Topic topic, String name, String messageSelector) throws jakarta.jms.JMSException
createSharedDurableConsumer
in interface jakarta.jms.Session
jakarta.jms.JMSException
Copyright © 2023 ScalAgent D.T.. All rights reserved.