Class: RSMP::StatusUpdateOrResponseCollector
- Inherits:
-
StateCollector
- Object
- Listener
- Collector
- StateCollector
- RSMP::StatusUpdateOrResponseCollector
- Defined in:
- lib/rsmp/collect/status_update_or_response_collector.rb
Overview
Base class for waiting for status updates or responses
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from StateCollector
Attributes inherited from Collector
#condition, #error, #messages, #status, #task
Instance Method Summary collapse
- #build_query(want) ⇒ Object
-
#get_items(message) ⇒ Object
Get items, in our case status values.
-
#initialize(proxy, want, options = {}) ⇒ StatusUpdateOrResponseCollector
constructor
A new instance of StatusUpdateOrResponseCollector.
Methods inherited from StateCollector
#describe, #done?, #keep, #messages, #perform_match, #progress, #query_result, #query_status, #reached, #summary
Methods inherited from Collector
#cancel, #cancelled?, #collect, #collect!, #collecting?, #complete, #describe, #describe_progress, #do_stop, #done?, #ingoing?, #inspect, #keep, #notify, #notify_disconnect, #notify_error, #notify_schema_error, #ok?, #outgoing?, #perform_match, #ready?, #reject_not_ack, #reset, #start, #timeout?, #type_match?, #use_task, #wait, #wait!
Methods inherited from Listener
#change_notifier, #notify, #notify_error
Methods included from Inspect
Constructor Details
#initialize(proxy, want, options = {}) ⇒ StatusUpdateOrResponseCollector
Returns a new instance of StatusUpdateOrResponseCollector.
4 5 6 |
# File 'lib/rsmp/collect/status_update_or_response_collector.rb', line 4 def initialize proxy, want, ={} super proxy, want, .merge(outgoing: false) end |
Instance Method Details
#build_query(want) ⇒ Object
8 9 10 |
# File 'lib/rsmp/collect/status_update_or_response_collector.rb', line 8 def build_query want RSMP::StatusQuery.new want end |
#get_items(message) ⇒ Object
Get items, in our case status values
13 14 15 |
# File 'lib/rsmp/collect/status_update_or_response_collector.rb', line 13 def get_items .attributes['sS'] || [] end |