1 /*
2 * $Id: JmxSupport.java 7963 2007-08-21 08:53:15Z dirk.olmes $
3 * --------------------------------------------------------------------------------------
4 * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5 *
6 * The software in this package is published under the terms of the CPAL v1.0
7 * license, a copy of which has been included with this distribution in the
8 * LICENSE.txt file.
9 */
10
11 package org.mule.management.support;
12
13 import javax.management.MalformedObjectNameException;
14 import javax.management.ObjectName;
15
16 /**
17 * Mule JMX supporting interface.
18 */
19 public interface JmxSupport
20 {
21 /** Default Mule domain prefix for all instances. */
22 String DEFAULT_JMX_DOMAIN_PREFIX = "Mule";
23
24 /**
25 * Uses JMX 1.2 and higher standard escape method and semantics.
26 * @param name value to escape for JMX compliance
27 * @return value valid for JMX
28 */
29 String escape(String name);
30
31 /**
32 * Calculates the domain name for the current Mule instance. The rules are:
33 * <ul>
34 * <li>Default Mule domain
35 * <li>If this server's instance ID is available, append "." (dot) and the ID
36 * <li>If no instance ID is available, don't append anything
37 * </ul>
38 * @return JMX domain name
39 */
40 String getDomainName();
41
42 /**
43 * Create an object name. May cache the result.
44 * @param name jmx object name
45 * @return object name for MBeanServer consumption
46 * @throws MalformedObjectNameException for invalid names
47 */
48 ObjectName getObjectName(String name) throws MalformedObjectNameException;
49 }