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.
905 906 907 |
# File 'lib/march_hare/channel.rb', line 905 def initialize(block) @block = block end |
Class Method Details
.from(block) ⇒ Object
901 902 903 |
# File 'lib/march_hare/channel.rb', line 901 def self.from(block) new(block) end |
Instance Method Details
#handleReturn(reply_code, reply_text, exchange, routing_key, basic_properties, payload) ⇒ Object
909 910 911 912 |
# File 'lib/march_hare/channel.rb', line 909 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 |