public interface Message
| Modifier and Type | Method and Description |
|---|---|
String |
getBody()
Returns the body of the message.
|
String |
getQueueGroup()
Returns the queue group of the message.
|
String |
getSubject()
Returns the subject used to send the message.
|
boolean |
isRequest()
Returns
true if the message originated from a request, false if the message originated from a
publish. |
void |
reply(String message)
Sends a reply to this message.
|
void |
reply(String message,
long delay,
TimeUnit unit)
Sends a reply to this message after the specified delay has passed.
|
boolean isRequest()
true if the message originated from a request, false if the message originated from a
publish. If the message originated from a request, the reply(String) and
reply(String, long, java.util.concurrent.TimeUnit) may be used to reply to the request.true if the message originated from a request, false if the message originated from a
publish.String getSubject()
String getBody()
String getQueueGroup()
void reply(String message)
replyTo field, a
NatsException will be thrown.message - the message with which to reply to the requesterUnsupportedOperationException - if the message did not originate from a requestvoid reply(String message, long delay, TimeUnit unit)
replyTo field, a
NatsException will be thrown.message - the message with which to reply to the requesterdelay - the amount of time to wait before sending the replyunit - the time unit of the delay argumentUnsupportedOperationException - if the message did not originate from a requestCopyright © 2015. All Rights Reserved.