Class Message<T>
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
Messages have a body(), which can be null, and also headers(), which can be empty.
If the message was sent specifying a reply handler, it can be replied to using reply(Object).
If you want to notify the sender that processing failed, then fail(int, String) can be called.
NOTE: This class has been automatically generated from the original non RX-ified interface using Vert.x codegen.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddress()The address the message was sent tobody()The body of the message.booleanvoidSignal to the sender that processing of this message failed.inthashCode()headers()Multi-map of message headers.booleanisSend()Signals if this message represents a send or publish event.static <T> Message<T> newInstance(Message arg) static <T> Message<T> newInstance(Message arg, io.vertx.lang.rx.TypeArg<T> __typeArg_T) voidReply to this message.voidreply(Object message, DeliveryOptions options) Linkreply(Object)but allows you to specify delivery options for the reply.The reply address.replyAndRequest(Object message) Reply to this message, specifying areplyHandlerfor the reply - i.e. to receive the reply to the reply.replyAndRequest(Object message, DeliveryOptions options) LikereplyAndRequest(Object)but specifyingoptionsthat can be used to configure the delivery.rxReplyAndRequest(Object message) Reply to this message, specifying areplyHandlerfor the reply - i.e. to receive the reply to the reply.rxReplyAndRequest(Object message, DeliveryOptions options) LikereplyAndRequest(Object)but specifyingoptionsthat can be used to configure the delivery.toString()
-
Field Details
-
__TYPE_ARG
-
__typeArg_0
-
-
Constructor Details
-
Message
-
Message
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
address
-
headers
-
body
-
replyAddress
The reply address. Can be null.- Returns:
- the reply address, or null, if message was sent without a reply handler.
-
isSend
public boolean isSend()Signals if this message represents a send or publish event.- Returns:
- true if this is a send.
-
reply
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.
- Parameters:
message- the message to reply with.
-
reply
Linkreply(Object)but allows you to specify delivery options for the reply.- Parameters:
message- the reply messageoptions- the delivery options
-
replyAndRequest
Reply to this message, specifying areplyHandlerfor the reply - i.e. to receive the reply to the reply.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.
- Parameters:
message- the message to reply with.- Returns:
- a future notified when any reply from the recipient is received
-
rxReplyAndRequest
Reply to this message, specifying areplyHandlerfor the reply - i.e. to receive the reply to the reply.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.
- Parameters:
message- the message to reply with.- Returns:
- a future notified when any reply from the recipient is received
-
replyAndRequest
LikereplyAndRequest(Object)but specifyingoptionsthat can be used to configure the delivery.- Parameters:
message- the message body, may benulloptions- delivery options- Returns:
- a future notified when any reply from the recipient is received
-
rxReplyAndRequest
LikereplyAndRequest(Object)but specifyingoptionsthat can be used to configure the delivery.- Parameters:
message- the message body, may benulloptions- delivery options- Returns:
- a future notified when any reply from the recipient is received
-
fail
Signal to the sender 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.
- Parameters:
failureCode- A failure code to pass back to the sendermessage- A message to pass back to the sender
-
newInstance
-
newInstance
-