get management Object Name - Java javax.management

Java examples for javax.management:ObjectName

Description

get management Object Name

Demo Code


//package com.java2s;

import javax.management.ObjectName;

import java.util.Hashtable;

public class Main {
    public static ObjectName getObjectName(String domain, String name,
            String type, String scope) throws Exception {
        Hashtable<String, String> map = new Hashtable<String, String>();
        if (name != null)
            map.put("name", name);
        if (type != null)
            map.put("type", type);
        if (scope != null)
            map.put("scope", scope);
        return ObjectName.getInstance(domain, map);
    }/*from ww w  .ja va 2  s .  c o m*/
}

Related Tutorials