| java.lang.Object org.jboss.mq.SpySession
All known Subclasses: org.jboss.mq.SpyTopicSession, org.jboss.mq.SpyQueueSession,
SpySession | public class SpySession implements Session,XASession(Code) | | This class implements javax.jms.Session and javax.jms.XASession
author: Norbert Lataille (Norbert.Lataille@m4x.org) author: Hiram Chirino (Cojonudo14@hotmail.com) @created August 16, 2001 version: $Revision: 57198 $ |
Method Summary | |
void | addConsumer(SpyMessageConsumer who) | void | addMessage(SpyMessage message) | void | addProducer(SpyMessageProducer who) | void | addUnacknowlegedMessage(SpyMessage message) | void | asynchFailure(String message, Throwable t) | public void | close() | public void | commit() | public QueueBrowser | createBrowser(Queue queue) | public QueueBrowser | createBrowser(Queue queue, String messageSelector) | public BytesMessage | createBytesMessage() | public MessageConsumer | createConsumer(Destination destination) | public MessageConsumer | createConsumer(Destination destination, String messageSelector) | public MessageConsumer | createConsumer(Destination destination, String messageSelector, boolean noLocal) | public TopicSubscriber | createDurableSubscriber(Topic topic, String name) | public TopicSubscriber | createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) | public MapMessage | createMapMessage() | public Message | createMessage() | public ObjectMessage | createObjectMessage() | public ObjectMessage | createObjectMessage(Serializable object) | public MessageProducer | createProducer(Destination destination) | public TopicPublisher | createPublisher(Topic topic) | public Queue | createQueue(String queueName) | public QueueReceiver | createReceiver(Queue queue) | public QueueReceiver | createReceiver(Queue queue, String messageSelector) | public QueueSender | createSender(Queue queue) | public StreamMessage | createStreamMessage() | public TopicSubscriber | createSubscriber(Topic topic) | public TopicSubscriber | createSubscriber(Topic topic, String messageSelector, boolean noLocal) | public TemporaryQueue | createTemporaryQueue() | public TemporaryTopic | createTemporaryTopic() | public TextMessage | createTextMessage() | public TextMessage | createTextMessage(String string) | public Topic | createTopic(String topicName) | public void | doAcknowledge(Message message, AcknowledgementRequest ack) JMS 11.2.21.2 Note that the acknowledge method of Message acknowledges
all messages received on that messages session.
JMS 11.3.2.2.3 Message.acknowledge method: Clarify that the method
applies to all consumed messages of the session. | public int | getAcknowledgeMode() | Object | getCurrentTransactionId() | public MessageListener | getMessageListener() | String | getNewMessageID() | public Session | getSession() | public boolean | getTransacted() | public XAResource | getXAResource() | public SpyXAResourceManager | getXAResourceManager() | void | interruptDeliveryLockWaiters() | public void | recover() | void | releaseDeliveryLock() | void | removeConsumer(SpyMessageConsumer who) | void | removeProducer(SpyMessageProducer who) | public void | rollback() | public void | run() | void | sendMessage(SpyMessage m) | void | setCurrentTransactionId(Object xid) | public void | setMessageListener(MessageListener listener) | public String | toString() | boolean | tryDeliveryLock() | void | unsetCurrentTransactionId(Object xid) | public void | unsubscribe(String name) |
acknowledgeMode | protected int acknowledgeMode(Code) | | What is the type of acknowledgement ?
|
closed | SynchronizedBoolean closed(Code) | | Is the session closed ?
|
connection | public Connection connection(Code) | | The connection object to which this session is linked
|
consumers | protected HashSet consumers(Code) | | MessageConsumers created by this session
|
deliveryLock | protected Object deliveryLock(Code) | | The delivery lock
|
inDelivery | protected boolean inDelivery(Code) | | Whether we are doing asynchronous delivery
|
log | static Logger log(Code) | | The log
|
producers | protected HashSet producers(Code) | | MessageProducers created by this session
|
running | public boolean running(Code) | | Is this session running right now?
|
sessionConsumer | SpyMessageConsumer sessionConsumer(Code) | | This consumer is the consumer that receives messages for the
MessageListener assigned to the session. The SpyConnectionConsumer
delivers messages to
|
spyXAResource | SpyXAResource spyXAResource(Code) | | If this is an XASession, we have an associated XAResource
|
trace | static boolean trace(Code) | | Whether trace is enabled
|
transacted | protected boolean transacted(Code) | | Is this session transacted ?
|
unacknowledgedMessages | ArrayList unacknowledgedMessages(Code) | | keep track of unacknowledged messages
|
SpySession | SpySession(Connection conn, boolean trans, int acknowledge, boolean xaSession)(Code) | | Create a new SpySession
Parameters: conn - the connection Parameters: trans - is the session transacted Parameters: acknowledge - the acknowledgement mode Parameters: xaSession - is the session an xa session |
addConsumer | void addConsumer(SpyMessageConsumer who) throws JMSException(Code) | | Add a consumer
Parameters: who - the consumer throws: JMSException - for any error |
addMessage | void addMessage(SpyMessage message)(Code) | | Add a message tot the session
Parameters: message - the message |
addProducer | void addProducer(SpyMessageProducer who) throws JMSException(Code) | | Add a producer
Parameters: who - the producer throws: JMSException - for any error |
addUnacknowlegedMessage | void addUnacknowlegedMessage(SpyMessage message)(Code) | | Add an unacknowledged message
Parameters: message - the message |
asynchFailure | void asynchFailure(String message, Throwable t)(Code) | | Invoked to notify of asynchronous failure
Parameters: message - the message Parameters: t - the throwable |
close | public void close() throws JMSException(Code) | | |
commit | public void commit() throws JMSException(Code) | | |
createBrowser | public QueueBrowser createBrowser(Queue queue) throws JMSException(Code) | | |
createBrowser | public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException(Code) | | |
createBytesMessage | public BytesMessage createBytesMessage() throws JMSException(Code) | | |
createConsumer | public MessageConsumer createConsumer(Destination destination) throws JMSException(Code) | | |
createConsumer | public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException(Code) | | |
createConsumer | public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException(Code) | | |
createDurableSubscriber | public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException(Code) | | |
createDurableSubscriber | public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException(Code) | | |
createMapMessage | public MapMessage createMapMessage() throws JMSException(Code) | | |
createMessage | public Message createMessage() throws JMSException(Code) | | |
createObjectMessage | public ObjectMessage createObjectMessage() throws JMSException(Code) | | |
createObjectMessage | public ObjectMessage createObjectMessage(Serializable object) throws JMSException(Code) | | |
createProducer | public MessageProducer createProducer(Destination destination) throws JMSException(Code) | | |
createPublisher | public TopicPublisher createPublisher(Topic topic) throws JMSException(Code) | | |
createQueue | public Queue createQueue(String queueName) throws JMSException(Code) | | |
createReceiver | public QueueReceiver createReceiver(Queue queue) throws JMSException(Code) | | |
createReceiver | public QueueReceiver createReceiver(Queue queue, String messageSelector) throws JMSException(Code) | | |
createSender | public QueueSender createSender(Queue queue) throws JMSException(Code) | | |
createStreamMessage | public StreamMessage createStreamMessage() throws JMSException(Code) | | |
createSubscriber | public TopicSubscriber createSubscriber(Topic topic) throws JMSException(Code) | | |
createSubscriber | public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException(Code) | | |
createTemporaryQueue | public TemporaryQueue createTemporaryQueue() throws JMSException(Code) | | |
createTemporaryTopic | public TemporaryTopic createTemporaryTopic() throws JMSException(Code) | | |
createTextMessage | public TextMessage createTextMessage() throws JMSException(Code) | | |
createTextMessage | public TextMessage createTextMessage(String string) throws JMSException(Code) | | |
createTopic | public Topic createTopic(String topicName) throws JMSException(Code) | | |
doAcknowledge | public void doAcknowledge(Message message, AcknowledgementRequest ack) throws JMSException(Code) | | JMS 11.2.21.2 Note that the acknowledge method of Message acknowledges
all messages received on that messages session.
JMS 11.3.2.2.3 Message.acknowledge method: Clarify that the method
applies to all consumed messages of the session. Rationale for this
change: A possible misinterpretation of the existing Java API
documentation for Message.acknowledge assumed that only messages received
prior to this message should be acknowledged. The updated Java API
documentation statement emphasizes that message acknowledgement is really
a session-level activity and that this message is only being used to
identify the session in order to acknowledge all messages consumed by the
session. The acknowledge method was placed in the message object only to
enable easy access to acknowledgement capability within a message
listeners onMessage method. This change aligns the specification and Java
API documentation to define Message.acknowledge in the same manner.
Parameters: message - the message to acknowledge Parameters: ack - the acknowledgement request throws: JMSException - for any error |
getAcknowledgeMode | public int getAcknowledgeMode() throws JMSException(Code) | | |
getCurrentTransactionId | Object getCurrentTransactionId()(Code) | | Get the session's transaction id
Parameters: xid - the transaction id |
getMessageListener | public MessageListener getMessageListener() throws JMSException(Code) | | |
getNewMessageID | String getNewMessageID() throws JMSException(Code) | | Get a new message
the new message id throws: JMSException - for any error |
getSession | public Session getSession() throws JMSException(Code) | | |
getTransacted | public boolean getTransacted() throws JMSException(Code) | | |
getXAResourceManager | public SpyXAResourceManager getXAResourceManager()(Code) | | Retrieve the XA resource manager
the resource manager |
interruptDeliveryLockWaiters | void interruptDeliveryLockWaiters()(Code) | | Interrupt threads waiting for the delivery lock
|
recover | public void recover() throws JMSException(Code) | | |
releaseDeliveryLock | void releaseDeliveryLock()(Code) | | Release the delivery lock
|
removeConsumer | void removeConsumer(SpyMessageConsumer who) throws JMSException(Code) | | Remove a consumer
Parameters: who - the consumer throws: JMSException - for any error |
removeProducer | void removeProducer(SpyMessageProducer who) throws JMSException(Code) | | Remove a producer
Parameters: who - the producer throws: JMSException - for any error |
rollback | public void rollback() throws JMSException(Code) | | |
sendMessage | void sendMessage(SpyMessage m) throws JMSException(Code) | | Send a message
Parameters: m - the message throws: JMSException - for any error |
setCurrentTransactionId | void setCurrentTransactionId(Object xid)(Code) | | Set the session's transaction id
Parameters: xid - the transaction id |
setMessageListener | public void setMessageListener(MessageListener listener) throws JMSException(Code) | | |
tryDeliveryLock | boolean tryDeliveryLock()(Code) | | Try to lock the session for asynchronous delivery
true when the lock was obtained |
unsetCurrentTransactionId | void unsetCurrentTransactionId(Object xid)(Code) | | Remove the session's transaction id
Parameters: xid - the transaction id |
unsubscribe | public void unsubscribe(String name) throws JMSException(Code) | | |
|
|