Class: Fluent::Plugin::GroongaInput::GQTPInput::Handler
- Inherits:
-
Object
- Object
- Fluent::Plugin::GroongaInput::GQTPInput::Handler
- Defined in:
- lib/fluent/plugin/in_groonga.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(input, connection, repeater) ⇒ Handler
constructor
A new instance of Handler.
- #on_read(data) ⇒ Object
- #write_back(data) ⇒ Object
Constructor Details
#initialize(input, connection, repeater) ⇒ Handler
Returns a new instance of Handler.
400 401 402 403 404 405 406 |
# File 'lib/fluent/plugin/in_groonga.rb', line 400 def initialize(input, connection, repeater) @input = input @connection = connection @repeater = repeater @request_parser = RequestParser.new(@input) end |
Instance Method Details
#close ⇒ Object
417 418 419 420 |
# File 'lib/fluent/plugin/in_groonga.rb', line 417 def close @request_parser.close @connection.close end |
#on_read(data) ⇒ Object
408 409 410 411 |
# File 'lib/fluent/plugin/in_groonga.rb', line 408 def on_read(data) @request_parser << data @repeater.write(data) end |
#write_back(data) ⇒ Object
413 414 415 |
# File 'lib/fluent/plugin/in_groonga.rb', line 413 def write_back(data) @connection.write(data) end |