|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hornetq.api.core.client.ClientRequestor
public class ClientRequestor

The ClientRequestor class helps making requests.
The ClientRequestor constructor is given a ClientSession and a request address.
It creates a temporary queue for the responses and provides a request method that sends the request message and waits for its reply.
| Constructor Summary | |
|---|---|
ClientRequestor(ClientSession session,
SimpleString requestAddress)
Constructor for the ClientRequestor. |
|
ClientRequestor(ClientSession session,
String requestAddress)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes the ClientRequestor and its session. |
ClientMessage |
request(ClientMessage request)
Sends a message to the request address and wait indefinitely for a reply. |
ClientMessage |
request(ClientMessage request,
long timeout)
Sends a message to the request address and wait for the given timeout for a reply. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ClientRequestor(ClientSession session,
SimpleString requestAddress)
throws Exception
session - a ClientSession uses to handle requests and repliesrequestAddress - the address to send request messages to
Exception
public ClientRequestor(ClientSession session,
String requestAddress)
throws Exception
ExceptionClientRequestor(ClientSession, SimpleString)| Method Detail |
|---|
public ClientMessage request(ClientMessage request)
throws Exception
request - the message to send
Exception
public ClientMessage request(ClientMessage request,
long timeout)
throws Exception
request - the message to sendtimeout - the timeout to wait for a reply (in milliseconds)
null if no message is replied before the timeout elapses
Exception
public void close()
throws Exception
Exception - if an exception occurs while closing the ClientRequestor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||