Class MessageAdmin
java.lang.Object
org.apache.jmeter.protocol.jms.sampler.MessageAdmin
Administration of messages.
-
Method Summary
Modifier and TypeMethodDescriptionjavax.jms.Message
Get the reply message.static MessageAdmin
getAdmin()
Get the singleton MessageAdmin objectvoid
Try to associate a reply to a previously stored request.void
putRequest
(String id, javax.jms.Message request, 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 aCountDownLatch
-
Method Details
-
getAdmin
Get the singleton MessageAdmin object- Returns:
- singleton instance
-
putRequest
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 aCountDownLatch
- Parameters:
id
- id of the requestrequest
- request object to store under idlatch
- communication latch to signal when a reply for this request was received
-
putReply
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 registeredCountDownLatch
- Parameters:
id
- id of the requestreply
- object with the reply
-
get
Get the reply message.- Parameters:
id
- the id of the message- Returns:
- the received message or
null
-