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