Class: ThreadChannel

Inherits:
AbstractChannel show all
Defined in:
lib/cirrocumulus/channels.rb

Overview

Communication channel between different threads on local machine.

Instance Method Summary collapse

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, options = {})
  @ontology.handle_agree(sender, action, options)
end

#failure(sender, action, reason, options = {}) ⇒ Object



76
77
78
# File 'lib/cirrocumulus/channels.rb', line 76

def failure(sender, action, reason, options = {})
  @ontology.handle_failure(sender, action, reason, options)
end

#inform(sender, proposition, options = {}) ⇒ Object



52
53
54
# File 'lib/cirrocumulus/channels.rb', line 52

def inform(sender, proposition, options = {})
  @ontology.handle_inform(sender, proposition, options)
end

#query(sender, expression, options = {}) ⇒ Object



60
61
62
# File 'lib/cirrocumulus/channels.rb', line 60

def query(sender, expression, options = {})
  @ontology.handle_query(sender, expression, options)
end

#query_if(sender, proposition, options = {}) ⇒ Object



64
65
66
# File 'lib/cirrocumulus/channels.rb', line 64

def query_if(sender, proposition, options = {})
  @ontology.handle_query_if(sender, proposition, options)
end

#refuse(sender, action, reason, options = {}) ⇒ Object



72
73
74
# File 'lib/cirrocumulus/channels.rb', line 72

def refuse(sender, action, reason, options = {})
  @ontology.handle_refuse(sender, action, reason, options)
end

#request(sender, action, options = {}) ⇒ Object



56
57
58
# File 'lib/cirrocumulus/channels.rb', line 56

def request(sender, action, options = {})
  @ontology.handle_request(sender, action, options)
end