class NakadiListener

Public Class Methods

new(id, logstash_queue, codec) click to toggle source
# File lib/logstash/inputs/nakadi_listener.rb, line 10
def initialize(id, logstash_queue, codec)
  @id = id
  @logstash_queue = logstash_queue
  @codec = codec
end

Public Instance Methods

getId() click to toggle source
# File lib/logstash/inputs/nakadi_listener.rb, line 16
def getId
  @id
end
onError(event_url, error) click to toggle source
# File lib/logstash/inputs/nakadi_listener.rb, line 24
def onError(event_url, error)
  puts("onError: #{error}")
  if (error.isPresent and error.get.getException.isPresent)
    error.get.getException.get.printStackTrace
  end
end
onReceive(event_url, cursor, events) click to toggle source
# File lib/logstash/inputs/nakadi_listener.rb, line 20
def onReceive(event_url, cursor, events)
  events.each { |e| @logstash_queue << LogStash::Event.new(e) }
end
onSubscribed(endpoint, cursor) click to toggle source
# File lib/logstash/inputs/nakadi_listener.rb, line 31
def onSubscribed(endpoint, cursor)
end