Class: Droonga::Plugins::Watch::SubscribeHandler
- Includes:
- MessageParsable, SchemaCreatable
- Defined in:
- lib/droonga/plugins/watch.rb
Instance Attribute Summary
Attributes inherited from Handler
Instance Method Summary collapse
- #handle(message) ⇒ Object
-
#initialize(*args) ⇒ SubscribeHandler
constructor
A new instance of SubscribeHandler.
Methods inherited from Handler
Methods included from Droonga::Pluggable
Constructor Details
#initialize(*args) ⇒ SubscribeHandler
Returns a new instance of SubscribeHandler.
68 69 70 71 |
# File 'lib/droonga/plugins/watch.rb', line 68 def initialize(*args) super ensure_schema_created # TODO: REMOVE ME end |
Instance Method Details
#handle(message) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/droonga/plugins/watch.rb', line 73 def handle() subscriber, condition, query, route = () normalized_request = { :subscriber => subscriber, :condition => condition, :query => query, :route => route, } watcher = Watcher.new(@context) watcher.subscribe(normalized_request) true end |