public class RequestResponseConversation extends Conversation
| Modifier and Type | Class and Description |
|---|---|
static class |
RequestResponseConversation.Provider
Provider and tracker of generic request response conversations.
|
| Constructor and Description |
|---|
RequestResponseConversation(String topic,
int id,
int parentId)
Create a request/response conversation using the specified executor
|
| Modifier and Type | Method and Description |
|---|---|
void |
acceptMessage(byte[] message)
Accept a byte form of a message in the context of a given conversation.
|
byte[] |
sendRequest(byte[] request)
Sends the specified request, and waits indefinitely for the response.
|
byte[] |
sendRequest(byte[] request,
long timeout)
Sends the specified request, and waits the given number of milliseconds
for the response.
|
connection, equals, hashCode, id, isEnded, parentId, setConnection, topicpublic RequestResponseConversation(String topic, int id, int parentId)
topic - conversation topicid - unique conversation idparentId - unique conversation id of the parent conversation; 0 if
no parent conversationpublic final void acceptMessage(byte[] message)
ConversationacceptMessage in class Conversationmessage - byte buffer containing the raw messagepublic byte[] sendRequest(byte[] request,
long timeout)
request - request byte arraytimeout - timeout period in millisecondspublic byte[] sendRequest(byte[] request)
request - request byte arrayCopyright © 2014. All Rights Reserved.