Class: RSMP::StatusCollector
- Inherits:
-
StateCollector
- Object
- Listener
- Collector
- StateCollector
- RSMP::StatusCollector
- Defined in:
- lib/rsmp/collect/status_collector.rb
Overview
Base class for waiting for status updates or responses
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 = {}) ⇒ StatusCollector
constructor
A new instance of StatusCollector.
Methods inherited from StateCollector
#describe, #describe_progress, #describe_query, #done?, #keep, #log_complete, #messages, #perform_match, #progress, #progress_hash, #query_got_hash, #query_result, #query_status, #query_want_hash, #reached, #summary
Methods inherited from Collector
#cancel, #cancelled?, #collect, #collect!, #collecting?, #complete, #describe, #describe_num_and_type, #describe_progress, #describe_query, #describe_types, #do_stop, #done?, #identifier, #incomplete, #ingoing?, #inspect, #keep, #log_complete, #log_incomplete, #log_start, #notify, #notify_disconnect, #notify_error, #notify_schema_error, #ok!, #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 = {}) ⇒ StatusCollector
Returns a new instance of StatusCollector.
4 5 6 7 8 9 10 |
# File 'lib/rsmp/collect/status_collector.rb', line 4 def initialize proxy, want, ={} super proxy, want, .merge(title: 'status response') @options[:type] ||= [] @options[:type] << 'StatusUpdate' unless [:updates] == false @options[:type] << 'StatusResponse' unless [:reponses] == false end |
Instance Method Details
#build_query(want) ⇒ Object
12 13 14 |
# File 'lib/rsmp/collect/status_collector.rb', line 12 def build_query want RSMP::StatusQuery.new want end |
#get_items(message) ⇒ Object
Get items, in our case status values
17 18 19 |
# File 'lib/rsmp/collect/status_collector.rb', line 17 def get_items .attributes['sS'] || [] end |