Class: Vertx::Message
- Inherits:
-
Object
- Object
- Vertx::Message
- Defined in:
- src/main/ruby_scripts/core/event_bus.rb
Overview
Represents a message received from the event bus
Instance Attribute Summary (collapse)
-
- (Object) body
readonly
Returns the value of attribute body.
Instance Method Summary (collapse)
-
- (Object) reply(reply, &reply_handler)
Reply to this message.
Instance Attribute Details
- (Object) body (readonly)
Returns the value of attribute body
170 171 172 |
# File 'src/main/ruby_scripts/core/event_bus.rb', line 170 def body @body end |
Instance Method Details
- (Object) reply(reply, &reply_handler)
Reply to this message. If the message was sent specifying a receipt 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.
Replying to a message this way is equivalent to sending a message to an address which is the same as the message id
of the original message.
191 192 193 194 195 196 197 198 199 |
# File 'src/main/ruby_scripts/core/event_bus.rb', line 191 def reply(reply, &reply_handler) raise "A reply message must be specified" if reply == nil reply = EventBus.convert_msg(reply) if reply_handler != nil @j_del.reply(reply, InternalHandler.new(reply_handler)) else @j_del.reply(reply) end end |