Class MessageAdmin
- java.lang.Object
-
- org.apache.jmeter.protocol.jms.sampler.MessageAdmin
-
public class MessageAdmin extends Object
Administration of messages.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Message
get(String id)
Get the reply message.static MessageAdmin
getAdmin()
Get the singleton MessageAdmin objectvoid
putReply(String id, Message reply)
Try to associate a reply to a previously stored request.void
putRequest(String id, 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 Detail
-
getAdmin
public static MessageAdmin getAdmin()
Get the singleton MessageAdmin object- Returns:
- singleton instance
-
putRequest
public void putRequest(String id, 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
- 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
public void putReply(String id, 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 registeredCountDownLatch
- Parameters:
id
- id of the requestreply
- object with the reply
-
get
public Message get(String id)
Get the reply message.- Parameters:
id
- the id of the message- Returns:
- the received message or
null
-
-