Class: VertxMicrometerMetrics::PrometheusScrapingHandler

Inherits:
Object
  • Object
show all
Defined in:
/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-micrometer-metrics/prometheus_scraping_handler.rb

Overview

A Vert.x Web VertxWeb::Route handler for Prometheus metrics scraping.

Constant Summary

@@j_api_type =
Object.new

Class Method Summary (collapse)

Class Method Details

+ (Boolean) accept?(obj)

Returns:

  • (Boolean)


18
19
20
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-micrometer-metrics/prometheus_scraping_handler.rb', line 18

def @@j_api_type.accept?(obj)
  obj.class == PrometheusScrapingHandler
end

+ (Proc) create(registryName = nil)

Creates a Vert.x Web VertxWeb::Route handler for Prometheus metrics scraping. The registry specified by registryName is used.

Parameters:

  • registryName (String) (defaults to: nil)
    the backend metrics registry

Returns:

Raises:

  • (ArgumentError)


37
38
39
40
41
42
43
44
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-micrometer-metrics/prometheus_scraping_handler.rb', line 37

def self.create(registryName=nil)
  if !block_given? && registryName == nil
    return ::Vertx::Util::Utils.to_handler_proc(Java::IoVertxMicrometer::PrometheusScrapingHandler.java_method(:create, []).call()) { |val| val.j_del }
  elsif registryName.class == String && !block_given?
    return ::Vertx::Util::Utils.to_handler_proc(Java::IoVertxMicrometer::PrometheusScrapingHandler.java_method(:create, [Java::java.lang.String.java_class]).call(registryName)) { |val| val.j_del }
  end
  raise ArgumentError, "Invalid arguments when calling create(#{registryName})"
end

+ (Object) j_api_type



27
28
29
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-micrometer-metrics/prometheus_scraping_handler.rb', line 27

def self.j_api_type
  @@j_api_type
end

+ (Object) j_class



30
31
32
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-micrometer-metrics/prometheus_scraping_handler.rb', line 30

def self.j_class
  Java::IoVertxMicrometer::PrometheusScrapingHandler.java_class
end

+ (Object) unwrap(obj)



24
25
26
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-micrometer-metrics/prometheus_scraping_handler.rb', line 24

def @@j_api_type.unwrap(obj)
  obj.j_del
end

+ (Object) wrap(obj)



21
22
23
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-micrometer-metrics/prometheus_scraping_handler.rb', line 21

def @@j_api_type.wrap(obj)
  PrometheusScrapingHandler.new(obj)
end