Class: InnerClientMetricsCallback

Inherits:
MetricsCallback show all
Defined in:
lib/ff/ruby/server/sdk/api/inner_client_metrics_callback.rb

Instance Method Summary collapse

Constructor Details

#initialize(client_callback, logger = nil) ⇒ InnerClientMetricsCallback

Returns a new instance of InnerClientMetricsCallback.



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ff/ruby/server/sdk/api/inner_client_metrics_callback.rb', line 6

def initialize(client_callback, logger = nil)

  unless client_callback.kind_of?(ClientCallback)

    raise "The 'client_callback' parameter must be of '" + ClientCallback.to_s + "' data type"
  end

  if logger != nil

    @logger = logger
  else

    @logger = Logger.new(STDOUT)
  end

  @client_callback = client_callback
end

Instance Method Details

#on_metrics_error(error) ⇒ Object



29
30
31
32
# File 'lib/ff/ruby/server/sdk/api/inner_client_metrics_callback.rb', line 29

def on_metrics_error(error)

  @logger.error "Metrics error: " + error.to_s
end

#on_metrics_readyObject



24
25
26
27
# File 'lib/ff/ruby/server/sdk/api/inner_client_metrics_callback.rb', line 24

def on_metrics_ready

  @client_callback.on_metrics_processor_ready
end