JmxPolicy
Keywords: net.corda.testing.driver.JmxPolicy class
Date: 2023-09-18

net.corda.testing.driver

## Class JmxPolicy

- net.corda.testing.driver.JmxPolicy

-     public class JmxPolicy

  A class containing configuration information for Jolokia JMX, to be used when creating a node via the `driver`.

  See Also:
    `driver`

- - ### Field Detail

    - #### Companion

          public static net.corda.testing.driver.JmxPolicy.Companion Companion

  - ### Constructor Detail

    - #### JmxPolicy

          @Deprecated
          public JmxPolicy(boolean startJmxHttpServer,
                                       @NotNull
                                       PortAllocation jmxHttpServerPortAllocation)

      Deprecated.

      A class containing configuration information for Jolokia JMX, to be used when creating a node via the `driver`.

      Parameters:
        `startJmxHttpServer` - Indicates whether the spawned nodes should start with a Jolokia JMX agent to enable remoteJMX monitoring using HTTP/JSON.
        `jmxHttpServerPortAllocation` - The port allocation strategy to use for remote Jolokia/JMX monitoring over HTTP.Defaults to incremental from port 7005. Use `NodeHandle.jmxAddress` to get the assigned address.
      See Also:
        `driver`

    - #### JmxPolicy

          @Deprecated
          public JmxPolicy()

      Deprecated.

    - #### JmxPolicy

          public JmxPolicy(@NotNull
                           PortAllocation jmxHttpServerPortAllocation)

      Create a `class JmxPolicy` that turns on monitoring using the given `class PortAllocation`.

      See Also:
        `class JmxPolicy`, `class PortAllocation`

  - ### Method Detail

    - #### getStartJmxHttpServer

          public boolean getStartJmxHttpServer()

      Indicates whether the spawned nodes should start with a Jolokia JMX agent to enable remote

      JMX monitoring using HTTP/JSON.

    - #### getJmxHttpServerPortAllocation

          @NotNull
          public PortAllocation getJmxHttpServerPortAllocation()

      The port allocation strategy to use for remote Jolokia/JMX monitoring over HTTP.

      Defaults to incremental from port 7005. Use `NodeHandle.jmxAddress` to get the assigned address.

      See Also:
        `NodeHandle.jmxAddress`

    - #### component1

          public boolean component1()

      Indicates whether the spawned nodes should start with a Jolokia JMX agent to enable remote

      JMX monitoring using HTTP/JSON.

    - #### component2

          @NotNull
          public PortAllocation component2()

      The port allocation strategy to use for remote Jolokia/JMX monitoring over HTTP.

      Defaults to incremental from port 7005. Use `NodeHandle.jmxAddress` to get the assigned address.

      See Also:
        `NodeHandle.jmxAddress`

    - #### copy

          @NotNull
          public JmxPolicy copy(boolean startJmxHttpServer,
                                         @NotNull
                                         PortAllocation jmxHttpServerPortAllocation)

      A class containing configuration information for Jolokia JMX, to be used when creating a node via the `driver`.

      See Also:
        `driver`

    - #### toString

          @NotNull
          public java.lang.String toString()

      A class containing configuration information for Jolokia JMX, to be used when creating a node via the `driver`.

      See Also:
        `driver`

    - #### hashCode

          public int hashCode()

      A class containing configuration information for Jolokia JMX, to be used when creating a node via the `driver`.

      See Also:
        `driver`

    - #### equals

          public boolean equals(@Nullable
                                java.lang.Object p)

      A class containing configuration information for Jolokia JMX, to be used when creating a node via the `driver`.

      See Also:
        `driver`

    - #### defaultEnabled

          @JvmStatic
           @NotNull
          public static JmxPolicy defaultEnabled()

      Returns a default `class JmxPolicy` that turns on monitoring.

      See Also:
        `class JmxPolicy`