Class List Method List File List

# Class: VertxDropwizard::MetricsService

Inherits:
  Object
  - Object
  - VertxDropwizard::MetricsService
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-dropwizard/metrics_service.rb

## Class Method Summary (collapse)

- + (Object) create(vertx = nil)

## Instance Method Summary (collapse)

- - (Object) get_base_name(measured = nil)
- - (Object) get_metrics_snapshot(param_1 = nil)
- - (MetricsService) initialize(j_del) constructor
  A new instance of MetricsService.
- - (Object) j_del
- - (Object) metrics_names

## Constructor Details

### - (`MetricsService`) initialize(j_del)

Returns a new instance of MetricsService

    10
    11
    12
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-dropwizard/metrics_service.rb', line 10

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(vertx = nil)

Raises:

- (`ArgumentError`)

    21
    22
    23
    24
    25
    26
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-dropwizard/metrics_service.rb', line 21

    def self.create(vertx=nil)
      if vertx.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtDropwizard::MetricsService.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxDropwizard::MetricsService)
      end
      raise ArgumentError, "Invalid arguments when calling create(vertx)"
    end

## Instance Method Details

### - (`Object`) get_base_name(measured = nil)

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-dropwizard/metrics_service.rb', line 29

    def get_base_name(measured=nil)
      if measured.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:getBaseName, [Java::IoVertxCoreMetrics::Measured.java_class]).call(measured.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling get_base_name(measured)"
    end

### - (`Object`) get_metrics_snapshot(param_1 = nil)

Raises:

- (`ArgumentError`)

    51
    52
    53
    54
    55
    56
    57
    58
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-dropwizard/metrics_service.rb', line 51

    def get_metrics_snapshot(param_1=nil)
      if param_1.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:getMetricsSnapshot, [Java::IoVertxCoreMetrics::Measured.java_class]).call(param_1.j_del) != nil ? JSON.parse(@j_del.java_method(:getMetricsSnapshot, [Java::IoVertxCoreMetrics::Measured.java_class]).call(param_1.j_del).encode) : nil
      elsif param_1.class == String && !block_given?
        return @j_del.java_method(:getMetricsSnapshot, [Java::java.lang.String.java_class]).call(param_1) != nil ? JSON.parse(@j_del.java_method(:getMetricsSnapshot, [Java::java.lang.String.java_class]).call(param_1).encode) : nil
      end
      raise ArgumentError, "Invalid arguments when calling get_metrics_snapshot(param_1)"
    end

### - (`Object`) j_del

    15
    16
    17
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-dropwizard/metrics_service.rb', line 15

    def j_del
      @j_del
    end

### - (`Object`) metrics_names

Raises:

- (`ArgumentError`)

    36
    37
    38
    39
    40
    41
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-dropwizard/metrics_service.rb', line 36

    def metrics_names
      if !block_given?
        return ::Vertx::Util::Utils.to_set(@j_del.java_method(:metricsNames, []).call()).map! { |elt| elt }
      end
      raise ArgumentError, "Invalid arguments when calling metrics_names()"
    end