Module: RSMP::Receiver
Instance Method Summary collapse
- #accept_message?(message) ⇒ Boolean
- #handle_message(message) ⇒ Object
- #initialize_receiver(distributor, filter: nil) ⇒ Object
- #receive(message) ⇒ Object
- #receive_error(error, options = {}) ⇒ Object
- #reject_message?(message) ⇒ Boolean
- #start_receiving ⇒ Object
- #stop_receiving ⇒ Object
Methods included from Inspect
Instance Method Details
#accept_message?(message) ⇒ Boolean
28 29 30 |
# File 'lib/rsmp/collect/receiver.rb', line 28 def () @filter.nil? || @filter.accept?() end |
#handle_message(message) ⇒ Object
36 |
# File 'lib/rsmp/collect/receiver.rb', line 36 def (); end |
#initialize_receiver(distributor, filter: nil) ⇒ Object
9 10 11 12 |
# File 'lib/rsmp/collect/receiver.rb', line 9 def initialize_receiver(distributor, filter: nil) @distributor = distributor @filter = filter end |
#receive(message) ⇒ Object
22 23 24 |
# File 'lib/rsmp/collect/receiver.rb', line 22 def receive() () if () end |
#receive_error(error, options = {}) ⇒ Object
26 |
# File 'lib/rsmp/collect/receiver.rb', line 26 def receive_error(error, = {}); end |
#reject_message?(message) ⇒ Boolean
32 33 34 |
# File 'lib/rsmp/collect/receiver.rb', line 32 def () !() end |
#start_receiving ⇒ Object
14 15 16 |
# File 'lib/rsmp/collect/receiver.rb', line 14 def start_receiving @distributor.add_receiver(self) end |
#stop_receiving ⇒ Object
18 19 20 |
# File 'lib/rsmp/collect/receiver.rb', line 18 def stop_receiving @distributor.remove_receiver(self) end |