code: public static JmxExporterConfig defaultJmxExporterConfig(final InetAddress hostname, final Integer rmiRegistryPort, final Integer rmiServerPort, final boolean useRandomIds)
          throws IOException
      {
          return new JmxExporterConfig(
              (hostname != null) ? hostname : InetAddress.getByName(null),
              (rmiRegistryPort != null) ? rmiRegistryPort : NetUtils.findUnusedPort(),
              (rmiServerPort != null) ? rmiServerPort : NetUtils.findUnusedPort(),
              useRandomIds);
      }
docs: Creates a default configuration object.
  
  @param hostname The hostname to use. If null, the localhost is used.
  @param rmiRegistryPort The port for the JMX registry. This is where remote clients will connect to the MBean server.
  @param rmiServerPort The port for the JMX Server. If null, a random port is used.
  @param useRandomIds If true, use random ids for RMI.
  @return A JmxExportConfig object.
  
  @throws IOException