All Downloads are FREE. Search and download functionalities are using the official Maven repository.

oshi.demo.jmx.CreateJmxOshiAgent Maven / Gradle / Ivy

There is a newer version: 6.6.5
Show newest version
/*
 * Copyright 2022-2023 The OSHI Project Contributors
 * SPDX-License-Identifier: MIT
 */
package oshi.demo.jmx;

import java.util.Map;

import oshi.demo.jmx.api.JMXOshiAgent;

public class CreateJmxOshiAgent {
    private static ContextRegistrationPlatform platform = new ContextRegistrationPlatform();

    public static JMXOshiAgent createJmxOshiAgent(Integer port, String host) throws Exception {
        return JMXOshiAgentServer.getInstance(host, port, null, platform);
    }

    public static JMXOshiAgent createJmxOshiAgent(Integer port, String host, Map properties)
            throws Exception {
        return JMXOshiAgentServer.getInstance(host, port, properties, platform);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy