public final class ClientRequestor extends Object
Constructor and Description |
---|
ClientRequestor(ClientSession session,
SimpleString requestAddress)
Constructor for the ClientRequestor.
|
ClientRequestor(ClientSession session,
String requestAddress) |
Modifier and Type | Method and Description |
---|---|
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.
|
public ClientRequestor(ClientSession session, SimpleString requestAddress) throws Exception
session
- a ClientSession uses to handle requests and repliesrequestAddress
- the address to send request messages toException
public ClientRequestor(ClientSession session, String requestAddress) throws Exception
Exception
ClientRequestor(ClientSession, SimpleString)
public ClientMessage request(ClientMessage request) throws Exception
request
- the message to sendException
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 elapsesException
Copyright © 2016 JBoss by Red Hat. All rights reserved.