org.rhq.plugins.jmx.util
Class ParentDefinedJMXServerNamingUtility

java.lang.Object
  extended by org.rhq.plugins.jmx.util.ParentDefinedJMXServerNamingUtility

public class ParentDefinedJMXServerNamingUtility
extends Object

A simple utility class to extract the name of a JMX server from the parent resource's plugin configuration.

Author:
Lukas Krejci

Field Summary
static String PROPERTY_CHILD_JMX_SERVER_NAME
           
 
Constructor Summary
ParentDefinedJMXServerNamingUtility()
           
 
Method Summary
static String getJVMName(ResourceDiscoveryContext<?> context)
          Checks if the parent resource's plugin configuration contains a property called PROPERTY_CHILD_JMX_SERVER_NAME.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_CHILD_JMX_SERVER_NAME

public static final String PROPERTY_CHILD_JMX_SERVER_NAME
See Also:
Constant Field Values
Constructor Detail

ParentDefinedJMXServerNamingUtility

public ParentDefinedJMXServerNamingUtility()
Method Detail

getJVMName

public static String getJVMName(ResourceDiscoveryContext<?> context)
Checks if the parent resource's plugin configuration contains a property called PROPERTY_CHILD_JMX_SERVER_NAME. If such property exists and its value is non-empty, its value is returned. Otherwise the name of the provided resource type is returned.

Parameters:
context - the discovery context to get the parent plugin configuration and current resource type from.
Returns:
the name that can be used for the JVM


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.