public class MessageAdmin extends Object
Modifier and Type | Method and Description |
---|---|
javax.jms.Message |
get(String id)
Get the reply message.
|
static MessageAdmin |
getAdmin()
Get the singleton MessageAdmin object
|
void |
putReply(String id,
javax.jms.Message reply)
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 a
CountDownLatch |
public static MessageAdmin getAdmin()
public void putRequest(String id, javax.jms.Message request, CountDownLatch latch)
CountDownLatch
id
- id of the requestrequest
- request object to store under idlatch
- communication latch to signal when a reply for this request
was receivedpublic void putReply(String id, javax.jms.Message reply)
CountDownLatch
id
- id of the requestreply
- object with the replypublic javax.jms.Message get(String id)
id
- the id of the messagenull
Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.