Class: ThreadChannel
- Inherits:
-
AbstractChannel
- Object
- AbstractChannel
- ThreadChannel
- Defined in:
- lib/cirrocumulus/channels.rb
Overview
Communication channel between different threads on local machine.
Instance Method Summary collapse
- #agree(sender, action, options = {}) ⇒ Object
- #failure(sender, action, reason, options = {}) ⇒ Object
- #inform(sender, proposition, options = {}) ⇒ Object
-
#initialize(ontology) ⇒ ThreadChannel
constructor
A new instance of ThreadChannel.
- #query(sender, expression, options = {}) ⇒ Object
- #query_if(sender, proposition, options = {}) ⇒ Object
- #refuse(sender, action, reason, options = {}) ⇒ Object
- #request(sender, action, options = {}) ⇒ Object
Constructor Details
#initialize(ontology) ⇒ ThreadChannel
Returns a new instance of ThreadChannel.
48 49 50 |
# File 'lib/cirrocumulus/channels.rb', line 48 def initialize(ontology) @ontology = ontology end |
Instance Method Details
#agree(sender, action, options = {}) ⇒ Object
68 69 70 |
# File 'lib/cirrocumulus/channels.rb', line 68 def agree(sender, action, = {}) @ontology.handle_agree(sender, action, ) end |
#failure(sender, action, reason, options = {}) ⇒ Object
76 77 78 |
# File 'lib/cirrocumulus/channels.rb', line 76 def failure(sender, action, reason, = {}) @ontology.handle_failure(sender, action, reason, ) end |
#inform(sender, proposition, options = {}) ⇒ Object
52 53 54 |
# File 'lib/cirrocumulus/channels.rb', line 52 def inform(sender, proposition, = {}) @ontology.handle_inform(sender, proposition, ) end |
#query(sender, expression, options = {}) ⇒ Object
60 61 62 |
# File 'lib/cirrocumulus/channels.rb', line 60 def query(sender, expression, = {}) @ontology.handle_query(sender, expression, ) end |
#query_if(sender, proposition, options = {}) ⇒ Object
64 65 66 |
# File 'lib/cirrocumulus/channels.rb', line 64 def query_if(sender, proposition, = {}) @ontology.handle_query_if(sender, proposition, ) end |
#refuse(sender, action, reason, options = {}) ⇒ Object
72 73 74 |
# File 'lib/cirrocumulus/channels.rb', line 72 def refuse(sender, action, reason, = {}) @ontology.handle_refuse(sender, action, reason, ) end |
#request(sender, action, options = {}) ⇒ Object
56 57 58 |
# File 'lib/cirrocumulus/channels.rb', line 56 def request(sender, action, = {}) @ontology.handle_request(sender, action, ) end |