Class: MarchHare::Channel::BlockReturnListener
- Inherits:
-
Object
- Object
- MarchHare::Channel::BlockReturnListener
- Defined in:
- lib/march_hare/channel.rb
Class Method Summary collapse
Instance Method Summary collapse
- #handleReturn(reply_code, reply_text, exchange, routing_key, basic_properties, payload) ⇒ Object
-
#initialize(block) ⇒ BlockReturnListener
constructor
A new instance of BlockReturnListener.
Constructor Details
#initialize(block) ⇒ BlockReturnListener
Returns a new instance of BlockReturnListener.
915 916 917 |
# File 'lib/march_hare/channel.rb', line 915 def initialize(block) @block = block end |
Class Method Details
.from(block) ⇒ Object
911 912 913 |
# File 'lib/march_hare/channel.rb', line 911 def self.from(block) new(block) end |
Instance Method Details
#handleReturn(reply_code, reply_text, exchange, routing_key, basic_properties, payload) ⇒ Object
919 920 921 922 |
# File 'lib/march_hare/channel.rb', line 919 def handleReturn(reply_code, reply_text, exchange, routing_key, basic_properties, payload) # TODO: convert properties to a Ruby hash @block.call(reply_code, reply_text, exchange, routing_key, basic_properties, String.from_java_bytes(payload)) end |