class Qpid::Proton::Handler::CAdaptor
@private
Public Class Methods
new(handler, on_error = nil)
click to toggle source
# File lib/handler/c_adaptor.rb, line 25 def initialize(handler, on_error = nil) @handler = handler @on_error = on_error end
Public Instance Methods
dispatch(cevent, ctype)
click to toggle source
# File lib/handler/c_adaptor.rb, line 30 def dispatch(cevent, ctype) event = Qpid::Proton::Event::Event.wrap(cevent, ctype) # TODO add a variable to enable this programmatically # print "EVENT: #{event} going to #{@handler}\n" event.dispatch(@handler) end
exception(error)
click to toggle source
# File lib/handler/c_adaptor.rb, line 37 def exception(error) if @on_error.nil? raise error else @on_error.call(error) end end