public class OutboundSession extends Object implements javax.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 org.objectweb.util.monolog.api.Logger |
logger |
(package private) javax.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(javax.jms.Session sess,
OutboundConnection cnx)
Constructs an
OutboundSession instance. |
OutboundSession(javax.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. |
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue)
Delegates the call to the wrapped JMS session.
|
javax.jms.QueueBrowser |
createBrowser(javax.jms.Queue queue,
String selector)
Delegates the call to the wrapped JMS session.
|
javax.jms.BytesMessage |
createBytesMessage()
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination dest)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination dest,
String selector)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createConsumer(javax.jms.Destination dest,
String selector,
boolean noLocal)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
Delegates the call to the wrapped JMS session.
|
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name)
Delegates the call to the wrapped JMS session.
|
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name,
String selector,
boolean noLocal)
Delegates the call to the wrapped JMS session.
|
javax.jms.MapMessage |
createMapMessage()
Delegates the call to the wrapped JMS session.
|
javax.jms.Message |
createMessage()
Delegates the call to the wrapped JMS session.
|
javax.jms.ObjectMessage |
createObjectMessage()
Delegates the call to the wrapped JMS session.
|
javax.jms.ObjectMessage |
createObjectMessage(Serializable obj)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageProducer |
createProducer(javax.jms.Destination dest)
Delegates the call to the wrapped JMS session.
|
javax.jms.Queue |
createQueue(String queueName)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String sharedSubscriptionName,
String messageSelector) |
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name)
Delegates the call to the wrapped JMS session.
|
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector)
Delegates the call to the wrapped JMS session.
|
javax.jms.StreamMessage |
createStreamMessage()
Delegates the call to the wrapped JMS session.
|
javax.jms.TemporaryQueue |
createTemporaryQueue()
Delegates the call to the wrapped JMS session.
|
javax.jms.TemporaryTopic |
createTemporaryTopic()
Delegates the call to the wrapped JMS session.
|
javax.jms.TextMessage |
createTextMessage()
Delegates the call to the wrapped JMS session.
|
javax.jms.TextMessage |
createTextMessage(String text)
Delegates the call to the wrapped JMS session.
|
javax.jms.Topic |
createTopic(String topicName)
Delegates the call to the wrapped JMS session.
|
int |
getAcknowledgeMode()
Delegates the call to the wrapped JMS session.
|
javax.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(javax.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 org.objectweb.util.monolog.api.Logger logger
protected OutboundConnection cnx
OutboundConnection
the session belongs to.javax.jms.Session sess
boolean valid
true
if this "handle" is valid.boolean started
true
if the session is started.protected boolean transacted
OutboundSession(javax.jms.Session sess, OutboundConnection cnx)
OutboundSession
instance.OutboundSession(javax.jms.Session sess, OutboundConnection cnx, boolean transacted)
OutboundSession
instance.public int getAcknowledgeMode() throws javax.jms.JMSException
getAcknowledgeMode
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 void setMessageListener(javax.jms.MessageListener messageListener) throws javax.jms.JMSException
IllegalStateException
instance.setMessageListener
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageListener getMessageListener() throws javax.jms.JMSException
IllegalStateException
instance.getMessageListener
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.TextMessage createTextMessage() throws javax.jms.JMSException
createTextMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TextMessage createTextMessage(String text) throws javax.jms.JMSException
createTextMessage
in interface javax.jms.Session
javax.jms.JMSException
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.ObjectMessage createObjectMessage() throws javax.jms.JMSException
createObjectMessage
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.ObjectMessage createObjectMessage(Serializable obj) 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.QueueBrowser createBrowser(javax.jms.Queue queue, String selector) throws javax.jms.JMSException
createBrowser
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.MessageProducer createProducer(javax.jms.Destination dest) throws javax.jms.JMSException
createProducer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest, String selector, boolean noLocal) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest, String selector) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.MessageConsumer createConsumer(javax.jms.Destination dest) throws javax.jms.JMSException
createConsumer
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, String name, String selector, boolean noLocal) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, String name) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Queue createQueue(String queueName) throws javax.jms.JMSException
createQueue
in interface javax.jms.Session
javax.jms.JMSException
public javax.jms.Topic createTopic(String topicName) throws javax.jms.JMSException
createTopic
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 run()
public void commit() throws javax.jms.JMSException
IllegalStateException
instance.commit
in interface javax.jms.Session
javax.jms.JMSException
public void rollback() throws javax.jms.JMSException
IllegalStateException
instance.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 void unsubscribe(String name) throws javax.jms.JMSException
unsubscribe
in interface javax.jms.Session
javax.jms.JMSException
void start()
public void close() throws javax.jms.JMSException
close
in interface javax.jms.Session
javax.jms.JMSException
public boolean isStarted()
void checkValidity() throws javax.jms.IllegalStateException
javax.jms.IllegalStateException
public javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic, String sharedSubscriptionName) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic, String sharedSubscriptionName, String messageSelector) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, String name) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, String name, String messageSelector, boolean noLocal) throws javax.jms.JMSException
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic, String name) throws javax.jms.JMSException
javax.jms.JMSException
Copyright © 2018 ScalAgent D.T.. All Rights Reserved.