org.apache.jmeter.protocol.jms.sampler

## Class TemporaryQueueExecutor

- java.lang.Object
- - org.apache.jmeter.protocol.jms.sampler.TemporaryQueueExecutor

All Implemented Interfaces:
  QueueExecutor

    public class TemporaryQueueExecutor
    extends Object
    implements QueueExecutor

Request/reply executor with a temporary reply queue.
Used by JMS Sampler (Point to Point)

### Constructor Summary

Constructors
Constructor and Description
`TemporaryQueueExecutor(javax.jms.QueueSession session, javax.jms.Queue destination, int timeoutMs)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `close()` Close the resources
`javax.jms.Message` `sendAndReceive(javax.jms.Message request, int deliveryMode, int priority, long expiration)` Sends and receives a message.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### TemporaryQueueExecutor

    public TemporaryQueueExecutor(javax.jms.QueueSession session,
                                  javax.jms.Queue destination,
                                  int timeoutMs)
                           throws javax.jms.JMSException

Constructor.

Parameters:
  `session` - the session to use to send the message
  `destination` - the queue to send the message on
  `timeoutMs` - Timeout in millis
Throws:
  `javax.jms.JMSException` - when internally used `QueueRequestor` can not be constructed with `session` and `destination`

### Method Detail

#### sendAndReceive

    public javax.jms.Message sendAndReceive(javax.jms.Message request,
                                            int deliveryMode,
                                            int priority,
                                            long expiration)
                                     throws javax.jms.JMSException

Sends and receives a message.

Specified by:
  `sendAndReceive` in interface `QueueExecutor`
Parameters:
  `request` - the message to send
  `deliveryMode` - the delivery mode to use
  `priority` - the priority for this message
  `expiration` - messages lifetime in ms
Returns:
  the received message or `null`
Throws:
  `javax.jms.JMSException` - in case of an exception from the messaging system

#### close

    public void close()
               throws javax.jms.JMSException

Description copied from interface: `QueueExecutor`
Close the resources

Specified by:
  `close` in interface `QueueExecutor`
Throws:
  `javax.jms.JMSException` - in case of an exception from the messaging system