Java MBean composeMBeanName(String objTypeName, String objInstanceName)

Here you can find the source of composeMBeanName(String objTypeName, String objInstanceName)

Description

compose M Bean Name

License

Apache License

Declaration

private static ObjectName composeMBeanName(String objTypeName,
            String objInstanceName) throws MalformedObjectNameException 

Method Source Code

//package com.java2s;
// Licensed to the Apache Software Foundation (ASF) under one

import javax.management.MalformedObjectNameException;

import javax.management.ObjectName;

public class Main {
    private static ObjectName composeMBeanName(String objTypeName,
            String objInstanceName) throws MalformedObjectNameException {

        String name = "com.cloud:type=" + objTypeName;
        if (objInstanceName != null && !objInstanceName.isEmpty())
            name += ", name=" + objInstanceName;

        return new ObjectName(name);
    }//from w w  w  .ja  v  a  2 s  .c om
}

Related

  1. chooseMBean(Set mbeans)
  2. convertToOpenMBeanAttribute(final MBeanAttributeInfo in, final String prefix)
  3. convertToOpenMBeanOperation(MBeanOperationInfo in)
  4. createMBeanServer()
  5. createOpenMBeanAttributeInfo(final OpenType type, final MBeanAttributeInfo in, final String prefix)