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.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Connection

#datasink=, #send_data

Instance Attribute Details

#parentObject

Returns the value of attribute parent.



21
22
23
# File 'lib/ffwd/handler.rb', line 21

def parent
  @parent
end

Class Method Details

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



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

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

  instance.instance_eval do
    @parent = parent
  end

  instance
end

Instance Method Details

#closeObject



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

def close; end

#connection_completedObject



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

def connection_completed
  @parent.connection_completed
end

#send_all(events, metrics) ⇒ Object



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

def send_all events, metrics; end

#send_event(event) ⇒ Object



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

def send_event event; end

#send_metric(metric) ⇒ Object



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

def send_metric metric; end

#unbindObject



33
34
35
# File 'lib/ffwd/handler.rb', line 33

def unbind
  @parent.unbind
end