org.ow2.jasmine.monitoring.mbeancmd
Class JmxHelper

java.lang.Object
  extended by org.ow2.jasmine.monitoring.mbeancmd.JmxHelper

public class JmxHelper
extends Object


Field Summary
static String DEFAULT_CONFIG_FILE
           
static String DEFAULT_FILE
          Default name of the properties file.
static String DEFAULT_URL
          Default JMX URL.
 
Constructor Summary
JmxHelper()
           
 
Method Summary
static Context getContext()
           
static String getDefaultJmxTarget()
          The JMX URL of the default target.
static String getDefaultTarget()
           
static String getJmxPassword(String jmxUrl)
           
static String getJmxProtocolProviderPackage(String jmxUrl)
           
static String[] getJmxTargets()
           
static String[] getJmxTargets(String[] proposed)
          Gets the names of all JMX targets matching a certain criteria.
static String getJmxUrl(String name)
          Gets the JMX URL for a given target.
static String getJmxUser(String jmxUrl)
           
static String getTargetName(String jmxUrl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_URL

public static final String DEFAULT_URL
Default JMX URL.

See Also:
Constant Field Values

DEFAULT_FILE

public static final String DEFAULT_FILE
Default name of the properties file.

See Also:
Constant Field Values

DEFAULT_CONFIG_FILE

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

JmxHelper

public JmxHelper()
Method Detail

getContext

public static Context getContext()

getDefaultJmxTarget

public static String getDefaultJmxTarget()
The JMX URL of the default target.

Returns:
JMX URL of the default target

getDefaultTarget

public static String getDefaultTarget()
Returns:
Default target.

getJmxUser

public static String getJmxUser(String jmxUrl)
Parameters:
jmxUrl - A given jmx URL
Returns:
The user name associated to this JMX URL

getJmxPassword

public static String getJmxPassword(String jmxUrl)
Parameters:
jmxUrl - A given jmx URL
Returns:
The password associated to this JMX URL

getJmxProtocolProviderPackage

public static String getJmxProtocolProviderPackage(String jmxUrl)
Parameters:
jmxUrl - jmxUrl A given jmx URL
Returns:
The protocol provider package associated to this JMX URL

getJmxUrl

public static String getJmxUrl(String name)
Gets the JMX URL for a given target.

Parameters:
name - Name of the target.
Returns:
JMX URL corresponding to that target.

getJmxTargets

public static String[] getJmxTargets()
Returns:
An array containing the names of all current JMX targets.

getTargetName

public static String getTargetName(String jmxUrl)
Parameters:
jmxUrl - A jmx url for a target that maybe defined in the configuration file.
Returns:
If there is a target having its url equal to the given jmxUrl, return its name. Otherwise return null.

getJmxTargets

public static String[] getJmxTargets(String[] proposed)
Gets the names of all JMX targets matching a certain criteria.

Parameters:
proposed - Criteria.
Returns:
An array containing the names of all current JMX targets.


Copyright © 2012 OW2 Consortium. All Rights Reserved.