class Liebre::Actor::Consumer

Constants

OPTS

Attributes

context[R]

Public Class Methods

new(context) click to toggle source
Calls superclass method
# File lib/liebre/actor/consumer.rb, line 15
def initialize context
  super()

  @context = context
end

Public Instance Methods

__ack__(info, opts) click to toggle source
# File lib/liebre/actor/consumer.rb, line 44
def __ack__(info, opts)
  reporter.on_ack { core.ack(info, opts) }
end
__clean__() click to toggle source
# File lib/liebre/actor/consumer.rb, line 58
def __clean__
  reporter.on_clean { core.clean() }
end
__consume__(info, meta, payload) click to toggle source
# File lib/liebre/actor/consumer.rb, line 40
def __consume__ info, meta, payload
  reporter.on_consume { core.consume(info, meta, payload) }
end
__failed__(info, error) click to toggle source
# File lib/liebre/actor/consumer.rb, line 54
def __failed__(info, error)
  reporter.on_failed(error) { core.failed(info, error) }
end
__nack__(info, opts) click to toggle source
# File lib/liebre/actor/consumer.rb, line 47
def __nack__(info, opts)
  reporter.on_nack { core.nack(info, opts) }
end
__reject__(info, opts) click to toggle source
# File lib/liebre/actor/consumer.rb, line 50
def __reject__(info, opts)
  reporter.on_reject { core.reject(info, opts) }
end
__start__() click to toggle source
# File lib/liebre/actor/consumer.rb, line 33
def __start__
  reporter.on_start { core.start }
end
__stop__() click to toggle source
# File lib/liebre/actor/consumer.rb, line 36
def __stop__
  reporter.on_stop { core.stop }
end
ack(info, opts = {}) click to toggle source
# File lib/liebre/actor/consumer.rb, line 26
def ack(info, opts = {})    async.__ack__(info, opts);     end
clean() click to toggle source
# File lib/liebre/actor/consumer.rb, line 31
def clean() async.__clean__(); end
consume(info, meta, payload) click to toggle source
# File lib/liebre/actor/consumer.rb, line 24
def consume(info, meta, payload) async.__consume__(info, meta, payload); end
failed(info, error) click to toggle source
# File lib/liebre/actor/consumer.rb, line 29
def failed(info, error)     async.__failed__(info, error); end
nack(info, opts = {}) click to toggle source
# File lib/liebre/actor/consumer.rb, line 27
def nack(info, opts = {})   async.__nack__(info, opts);    end
reject(info, opts = {}) click to toggle source
# File lib/liebre/actor/consumer.rb, line 28
def reject(info, opts = {}) async.__reject__(info, opts);  end
start() click to toggle source
# File lib/liebre/actor/consumer.rb, line 21
def start() async.__start__(); end
stop() click to toggle source
# File lib/liebre/actor/consumer.rb, line 22
def stop()  async.__stop__();  end

Private Instance Methods

core() click to toggle source
# File lib/liebre/actor/consumer.rb, line 64
def core
  @core ||= Core.new(self, resources, context, Callback)
end
reporter() click to toggle source
# File lib/liebre/actor/consumer.rb, line 72
def reporter
  @reporter ||= Reporter.new(context)
end
resources() click to toggle source
# File lib/liebre/actor/consumer.rb, line 68
def resources
  Resources.new(context)
end