Class: FFWD::Handler

Inherits:
Connection show all
Defined in:
lib/ffwd/handler.rb

Overview

Handlers are used by output plugins based of the protocol stack.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Connection

#datasink=, #send_data

Class Method Details

.new(signature, parent, *args) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/ffwd/handler.rb', line 21

def self.new signature, parent, *args
  instance = super(signature, *args)

  instance.instance_eval do
    @parent = parent
  end

  instance
end

Instance Method Details

#connection_completedObject



35
36
37
# File 'lib/ffwd/handler.rb', line 35

def connection_completed
  @parent.connection_completed
end

#send_all(events, metrics) ⇒ Object



39
# File 'lib/ffwd/handler.rb', line 39

def send_all events, metrics; end

#send_event(event) ⇒ Object



40
# File 'lib/ffwd/handler.rb', line 40

def send_event event; end

#send_metric(metric) ⇒ Object



41
# File 'lib/ffwd/handler.rb', line 41

def send_metric metric; end

#unbindObject



31
32
33
# File 'lib/ffwd/handler.rb', line 31

def unbind
  @parent.unbind
end