public interface Message<T>
Modifier and Type | Method and Description |
---|---|
String |
address()
The address the message was sent to
|
T |
body()
The body of the message
|
void |
fail(int failureCode,
String message)
Signal that processing of this message failed.
|
MultiMap |
headers() |
void |
reply(Object message)
Reply to this message.
|
void |
reply(Object message,
DeliveryOptions options) |
<R> void |
reply(Object message,
DeliveryOptions options,
Handler<AsyncResult<Message<R>>> replyHandler)
The same as
reply(R message) but you can specify handler for the reply - i.e. |
<R> void |
reply(Object message,
Handler<AsyncResult<Message<R>>> replyHandler)
The same as
reply(R message) but you can specify handler for the reply - i.e. |
String |
replyAddress()
The reply address (if any)
|
String address()
The address the message was sent to
MultiMap headers()
T body()
The body of the message
String replyAddress()
The reply address (if any)
void reply(Object message)
Reply to this message. If the message was sent specifying a reply handler, that handler will be called when it has received a reply. If the message wasn’t sent specifying a receipt handler this method does nothing.
<R> void reply(Object message, Handler<AsyncResult<Message<R>>> replyHandler)
The same as reply(R message)
but you can specify handler for the reply - i.e.
to receive the reply to the reply.
void reply(Object message, DeliveryOptions options)
<R> void reply(Object message, DeliveryOptions options, Handler<AsyncResult<Message<R>>> replyHandler)
The same as reply(R message)
but you can specify handler for the reply - i.e.
to receive the reply to the reply.
void fail(int failureCode, String message)
Signal that processing of this message failed. If the message was sent specifying a result handler the handler will be called with a failure corresponding to the failure code and message specified here
failureCode
- A failure code to pass back to the sendermessage
- A message to pass back to the senderCopyright © 2014. All Rights Reserved.