org.apache.jmeter.protocol.jms.sampler

## Class MessageAdmin

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

-     public class MessageAdmin
      extends java.lang.Object

  Administration of messages.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.jms.Message` | `get(java.lang.String id)` Get the reply message.
    `static MessageAdmin` | `getAdmin()` Get the singleton MessageAdmin object
    `void` | `putReply(java.lang.String id, javax.jms.Message reply)` Try to associate a reply to a previously stored request.
    `void` | `putRequest(java.lang.String id, javax.jms.Message request, java.util.concurrent.CountDownLatch latch)` Store a request under the given id, so that an arriving reply can be associated with this request and the waiting party can be signaled by means of a `CountDownLatch`

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

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

- - ### Method Detail

    - #### getAdmin

          public static MessageAdmin getAdmin()

      Get the singleton MessageAdmin object
      Returns:
        singleton instance

    - #### putRequest

          public void putRequest(java.lang.String id,
                                 javax.jms.Message request,
                                 java.util.concurrent.CountDownLatch latch)

      Store a request under the given id, so that an arriving reply can be associated with this request and the waiting party can be signaled by means of a `CountDownLatch`
      Parameters:
        `id` - id of the request
        `request` - request object to store under id
        `latch` - communication latch to signal when a reply for this request was received

    - #### putReply

          public void putReply(java.lang.String id,
                               javax.jms.Message reply)

      Try to associate a reply to a previously stored request. If a matching request is found, the owner of the request will be notified with the registered `CountDownLatch`
      Parameters:
        `id` - id of the request
        `reply` - object with the reply

    - #### get

          public javax.jms.Message get(java.lang.String id)

      Get the reply message.
      Parameters:
        `id` - the id of the message
      Returns:
        the received message or `null`

Copyright © 1998-2018 Apache Software Foundation. All Rights Reserved.