MessageConsumerWrapper (Bitronix Transaction Manager :: Core 2.1.4 API)
Date: 2013-09-15

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## bitronix.tm.resource.jms
Class MessageConsumerWrapper

    java.lang.Object
      bitronix.tm.resource.jms.MessageConsumerWrapper

All Implemented Interfaces:
  javax.jms.MessageConsumer

Direct Known Subclasses:
  TopicSubscriberWrapper

    public class MessageConsumerWrapper

extends Object
implements javax.jms.MessageConsumer

`MessageConsumer` wrapper that adds XA enlistment semantics.

Author:
  lorban

Field Summary
`protected DualSessionWrapper` | `session`

Constructor Summary
`MessageConsumerWrapper(javax.jms.MessageConsumer messageConsumer, DualSessionWrapper session, PoolingConnectionFactory poolingConnectionFactory)`

Method Summary
`void` | `close()`
`protected void` | `enlistResource()` Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
`javax.jms.MessageConsumer` | `getMessageConsumer()`
`javax.jms.MessageListener` | `getMessageListener()`
`String` | `getMessageSelector()`
`javax.jms.Message` | `receive()`
`javax.jms.Message` | `receive(long timeout)`
`javax.jms.Message` | `receiveNoWait()`
`void` | `setMessageListener(javax.jms.MessageListener listener)`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### session

    protected final DualSessionWrapper session

Constructor Detail

### MessageConsumerWrapper

    public MessageConsumerWrapper(javax.jms.MessageConsumer messageConsumer,
                                  DualSessionWrapper session,
                                  PoolingConnectionFactory poolingConnectionFactory)

Method Detail

### getMessageConsumer

    public javax.jms.MessageConsumer getMessageConsumer()

### enlistResource

    protected void enlistResource()
                           throws javax.jms.JMSException

  Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource. If no transaction is running then this method does nothing.

  Throws:
    `javax.jms.JMSException`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### receive

    public javax.jms.Message receive()
                              throws javax.jms.JMSException

  Specified by:
    `receive` in interface `javax.jms.MessageConsumer`
  Throws:
    `javax.jms.JMSException`

### receive

    public javax.jms.Message receive(long timeout)
                              throws javax.jms.JMSException

  Specified by:
    `receive` in interface `javax.jms.MessageConsumer`
  Throws:
    `javax.jms.JMSException`

### receiveNoWait

    public javax.jms.Message receiveNoWait()
                                    throws javax.jms.JMSException

  Specified by:
    `receiveNoWait` in interface `javax.jms.MessageConsumer`
  Throws:
    `javax.jms.JMSException`

### close

    public void close()
               throws javax.jms.JMSException

  Specified by:
    `close` in interface `javax.jms.MessageConsumer`
  Throws:
    `javax.jms.JMSException`

### getMessageSelector

    public String getMessageSelector()
                              throws javax.jms.JMSException

  Specified by:
    `getMessageSelector` in interface `javax.jms.MessageConsumer`
  Throws:
    `javax.jms.JMSException`

### getMessageListener

    public javax.jms.MessageListener getMessageListener()
                                                 throws javax.jms.JMSException

  Specified by:
    `getMessageListener` in interface `javax.jms.MessageConsumer`
  Throws:
    `javax.jms.JMSException`

### setMessageListener

    public void setMessageListener(javax.jms.MessageListener listener)
                            throws javax.jms.JMSException

  Specified by:
    `setMessageListener` in interface `javax.jms.MessageConsumer`
  Throws:
    `javax.jms.JMSException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006-2013 Bitronix Software. All Rights Reserved.