Example usage for javax.management ObjectName ObjectName

List of usage examples for javax.management ObjectName ObjectName

Introduction

In this page you can find the example usage for javax.management ObjectName ObjectName.

Prototype

public ObjectName(String name) throws MalformedObjectNameException 

Source Link

Document

Construct an object name from the given string.

Usage

From source file:catalina.mbeans.MBeanUtils.java

/**
 * Create an <code>ObjectName</code> for this
 * <code>Role</code> object.
 *
 * @param domain Domain in which this name is to be created
 * @param role The Role to be named/*  w w  w .  j  a v  a  2  s .c o m*/
 *
 * @exception MalformedObjectNameException if a name cannot be created
 */
public static ObjectName createObjectName(String domain, Role role) throws MalformedObjectNameException {

    ObjectName name = null;
    name = new ObjectName(domain + ":type=Role,rolename=" + role.getRolename() + ",database="
            + role.getUserDatabase().getId());
    return (name);

}

From source file:catalina.mbeans.MBeanUtils.java

/**
 * Create an <code>ObjectName</code> for this
 * <code>Server</code> object.
 *
 * @param domain Domain in which this name is to be created
 * @param server The Server to be named//from ww w . jav a  2s  .  c  om
 *
 * @exception MalformedObjectNameException if a name cannot be created
 */
public static ObjectName createObjectName(String domain, Server server) throws MalformedObjectNameException {

    ObjectName name = null;
    name = new ObjectName(domain + ":type=Server");
    return (name);

}

From source file:catalina.mbeans.MBeanUtils.java

/**
 * Create an <code>ObjectName</code> for this
 * <code>Service</code> object.
 *
 * @param domain Domain in which this name is to be created
 * @param service The Service to be named
 *
 * @exception MalformedObjectNameException if a name cannot be created
 *//*from  w w w.ja v a 2 s. c om*/
public static ObjectName createObjectName(String domain, Service service) throws MalformedObjectNameException {

    ObjectName name = null;
    name = new ObjectName(domain + ":type=Service,name=" + service.getName());
    return (name);

}