Class: LogStash::Inputs::Stdin::InputHandler
- Inherits:
-
EventMachine::Connection
- Object
- EventMachine::Connection
- LogStash::Inputs::Stdin::InputHandler
- Defined in:
- lib/logstash/inputs/stdin.rb
Overview
def receive
Instance Method Summary collapse
-
#initialize(obj) ⇒ InputHandler
constructor
A new instance of InputHandler.
-
#receive_data(data) ⇒ Object
def initialize.
Constructor Details
#initialize(obj) ⇒ InputHandler
Returns a new instance of InputHandler.
26 27 28 |
# File 'lib/logstash/inputs/stdin.rb', line 26 def initialize(obj) @receiver = obj end |
Instance Method Details
#receive_data(data) ⇒ Object
def initialize
30 31 32 33 34 35 |
# File 'lib/logstash/inputs/stdin.rb', line 30 def receive_data(data) @buffer ||= BufferedTokenizer.new @buffer.extract(data).each do |line| @receiver.receive(line) end end |