io.vertx.ext.dropwizard

## Class DropwizardMetricsOptions

- java.lang.Object
- - io.vertx.core.metrics.MetricsOptions
  - - io.vertx.ext.dropwizard.DropwizardMetricsOptions

-     public class DropwizardMetricsOptions
      extends MetricsOptions

  Vert.x Dropwizard metrics configuration.
  Author:
    Julien Viet

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEFAULT_JMX_ENABLED` The default value of JMX enabled = `false`
    `static List<Match>` | `DEFAULT_MONITORED_HANDLERS` The default monitored handlers : `null`
    `static List<Match>` | `DEFAULT_MONITORED_HTTP_CLIENT_ENDPOINTS` The default monitored http client endpoints : `null`
    `static List<Match>` | `DEFAULT_MONITORED_HTTP_CLIENT_URIS` The default monitored http client uris : `null`
    `static List<Match>` | `DEFAULT_MONITORED_HTTP_SERVER_ROUTES` The default monitored http server routes : `null`
    `static List<Match>` | `DEFAULT_MONITORED_HTTP_SERVER_URIS` The default monitored http server uris : `null`

    - ### Fields inherited from class io.vertx.core.metrics.MetricsOptions

      `DEFAULT_METRICS_ENABLED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DropwizardMetricsOptions()` Default constructor
    `DropwizardMetricsOptions(DropwizardMetricsOptions other)` Copy constructor
    `DropwizardMetricsOptions(JsonObject json)` Create an instance from a `JsonObject`
    `DropwizardMetricsOptions(MetricsOptions other)` Copy constructor with base metrics options

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DropwizardMetricsOptions` | `addMonitoredEventBusHandler(Match match)` Add a monitored event bus handler.
    `DropwizardMetricsOptions` | `addMonitoredHttpClientEndpoint(Match match)` Add an monitored http client endpoint.
    `DropwizardMetricsOptions` | `addMonitoredHttpClientUri(Match match)` Add an monitored http client uri.
    `DropwizardMetricsOptions` | `addMonitoredHttpServerRoute(Match match)` Add an monitored http server route.
    `DropwizardMetricsOptions` | `addMonitoredHttpServerUri(Match match)` Add an monitored http server uri.
    `String` | `getBaseName()`
    `String` | `getConfigPath()`
    `String` | `getJmxDomain()` Get the JMX domain to use when JMX metrics are enabled.
    `com.codahale.metrics.MetricRegistry` | `getMetricRegistry()` An optional metric registry used instead of the Dropwizard shared registry.
    `List<Match>` | `getMonitoredEventBusHandlers()`
    `List<Match>` | `getMonitoredHttpClientEndpoint()`
    `List<Match>` | `getMonitoredHttpClientUris()`
    `List<Match>` | `getMonitoredHttpServerRoutes()`
    `List<Match>` | `getMonitoredHttpServerUris()`
    `String` | `getRegistryName()` An optional name used for registering the metrics in the Dropwizard shared registry.
    `boolean` | `isJmxEnabled()` Will JMX be enabled on the Vert.x instance?
    `DropwizardMetricsOptions` | `setBaseName(String baseName)` Set a custom baseName for metrics.
    `DropwizardMetricsOptions` | `setConfigPath(String configPath)` Set the path for a config file that contains options in JSON format, to be used to create a new options object.
    `DropwizardMetricsOptions` | `setEnabled(boolean enable)` Set whether metrics will be enabled on the Vert.x instance.
    `DropwizardMetricsOptions` | `setJmxDomain(String jmxDomain)` Set the JMX domain to use when JMX metrics are enabled.
    `DropwizardMetricsOptions` | `setJmxEnabled(boolean jmxEnabled)` Set whether JMX will be enabled on the Vert.x instance.
    `DropwizardMetricsOptions` | `setMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)` Set the optional metric registry used instead of the Dropwizard shared registry.
    `DropwizardMetricsOptions` | `setRegistryName(String registryName)` Set the name used for registering the metrics in the Dropwizard shared registry.
    `JsonObject` | `toJson()`

    - ### Methods inherited from class io.vertx.core.metrics.MetricsOptions

      `getFactory, isEnabled, setFactory, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_JMX_ENABLED

          public static final boolean DEFAULT_JMX_ENABLED

      The default value of JMX enabled = `false`
      See Also:
        Constant Field Values

    - #### DEFAULT_MONITORED_HANDLERS

          public static final List<Match> DEFAULT_MONITORED_HANDLERS

      The default monitored handlers : `null`

    - #### DEFAULT_MONITORED_HTTP_SERVER_URIS

          public static final List<Match> DEFAULT_MONITORED_HTTP_SERVER_URIS

      The default monitored http server uris : `null`

    - #### DEFAULT_MONITORED_HTTP_SERVER_ROUTES

          public static final List<Match> DEFAULT_MONITORED_HTTP_SERVER_ROUTES

      The default monitored http server routes : `null`

    - #### DEFAULT_MONITORED_HTTP_CLIENT_URIS

          public static final List<Match> DEFAULT_MONITORED_HTTP_CLIENT_URIS

      The default monitored http client uris : `null`

    - #### DEFAULT_MONITORED_HTTP_CLIENT_ENDPOINTS

          public static final List<Match> DEFAULT_MONITORED_HTTP_CLIENT_ENDPOINTS

      The default monitored http client endpoints : `null`

  - ### Constructor Detail

    - #### DropwizardMetricsOptions

          public DropwizardMetricsOptions()

      Default constructor

    - #### DropwizardMetricsOptions

          public DropwizardMetricsOptions(MetricsOptions other)

      Copy constructor with base metrics options
      Parameters:
        `other` - The other `MetricsOptions` to copy when creating this

    - #### DropwizardMetricsOptions

          public DropwizardMetricsOptions(DropwizardMetricsOptions other)

      Copy constructor
      Parameters:
        `other` - The other `DropwizardMetricsOptions` to copy when creating this

    - #### DropwizardMetricsOptions

          public DropwizardMetricsOptions(JsonObject json)

      Create an instance from a `JsonObject`
      Parameters:
        `json` - the JsonObject to create it from

  - ### Method Detail

    - #### getRegistryName

          public String getRegistryName()

      An optional name used for registering the metrics in the Dropwizard shared registry.
      Returns:
        the registry name

    - #### setRegistryName

          public DropwizardMetricsOptions setRegistryName(String registryName)

      Set the name used for registering the metrics in the Dropwizard shared registry.
      Parameters:
        `registryName` - the name
      Returns:
        a reference to this, so the API can be used fluently

    - #### isJmxEnabled

          public boolean isJmxEnabled()

      Will JMX be enabled on the Vert.x instance?
      Returns:
        true if enabled, false if not.

    - #### setJmxEnabled

          public DropwizardMetricsOptions setJmxEnabled(boolean jmxEnabled)

      Set whether JMX will be enabled on the Vert.x instance.
      Parameters:
        `jmxEnabled` - true if JMX enabled, or false if not.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getJmxDomain

          public String getJmxDomain()

      Get the JMX domain to use when JMX metrics are enabled.
      Returns:
        the JMX domain

    - #### setJmxDomain

          public DropwizardMetricsOptions setJmxDomain(String jmxDomain)

      Set the JMX domain to use when JMX metrics are enabled.
      Parameters:
        `jmxDomain` - the JMX domain
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMonitoredEventBusHandlers

          public List<Match> getMonitoredEventBusHandlers()

      Returns:
        the list of monitored event bus handlers

    - #### addMonitoredEventBusHandler

          public DropwizardMetricsOptions addMonitoredEventBusHandler(Match match)

      Add a monitored event bus handler.
      Parameters:
        `match` - the event bus address match
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMonitoredHttpServerUris

          public List<Match> getMonitoredHttpServerUris()

      Returns:
        the list of monitored http server uris

    - #### addMonitoredHttpServerUri

          public DropwizardMetricsOptions addMonitoredHttpServerUri(Match match)

      Add an monitored http server uri.
      Parameters:
        `match` - the handler match
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMonitoredHttpServerRoutes

          public List<Match> getMonitoredHttpServerRoutes()

      Returns:
        the list of monitored http server routes

    - #### addMonitoredHttpServerRoute

          public DropwizardMetricsOptions addMonitoredHttpServerRoute(Match match)

      Add an monitored http server route.
      Parameters:
        `match` - the handler match
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMonitoredHttpClientUris

          public List<Match> getMonitoredHttpClientUris()

      Returns:
        the list of monitored http client uris

    - #### setEnabled

          public DropwizardMetricsOptions setEnabled(boolean enable)

      Description copied from class: `MetricsOptions`
      Set whether metrics will be enabled on the Vert.x instance.
      Overrides:
        `setEnabled` in class `MetricsOptions`
      Parameters:
        `enable` - true if metrics enabled, or false if not.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getConfigPath

          public String getConfigPath()

      Returns:
        the path for a config file to create an Options object from.

    - #### setConfigPath

          public DropwizardMetricsOptions setConfigPath(String configPath)

      Set the path for a config file that contains options in JSON format, to be used to create a new options object. The file will be looked for on the file system first and then on the classpath if it's not found.
      Parameters:
        `configPath` - the file name
      Returns:
        a reference to this, so the API can be used fluently

    - #### addMonitoredHttpClientUri

          public DropwizardMetricsOptions addMonitoredHttpClientUri(Match match)

      Add an monitored http client uri.
      Parameters:
        `match` - the handler match
      Returns:
        a reference to this, so the API can be used fluently

    - #### addMonitoredHttpClientEndpoint

          public DropwizardMetricsOptions addMonitoredHttpClientEndpoint(Match match)

      Add an monitored http client endpoint.
      Parameters:
        `match` - the handler match
      Returns:
        a reference to this, so the API can be used fluently

    - #### getMonitoredHttpClientEndpoint

          public List<Match> getMonitoredHttpClientEndpoint()

      Returns:
        the list of monitored http client endpoints

    - #### setBaseName

          public DropwizardMetricsOptions setBaseName(String baseName)

      Set a custom baseName for metrics.
      Parameters:
        `baseName` - the new baseName.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getBaseName

          public String getBaseName()

      Returns:
        The custom baseName.

    - #### getMetricRegistry

          public com.codahale.metrics.MetricRegistry getMetricRegistry()

      An optional metric registry used instead of the Dropwizard shared registry.
      Returns:
        the metricRegistry

    - #### setMetricRegistry

          public DropwizardMetricsOptions setMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)

      Set the optional metric registry used instead of the Dropwizard shared registry.
      Parameters:
        `metricRegistry` - the metricRegistry
      Returns:
        a reference to this, so the API can be used fluently

    - #### toJson

          public JsonObject toJson()

      Overrides:
        `toJson` in class `MetricsOptions`
      Returns:
        a JSON representation of these options

Copyright © 2022 Eclipse. All rights reserved.