org.rhq.plugins.perftest
Class ScenarioManager

java.lang.Object
  extended by org.rhq.plugins.perftest.ScenarioManager

public class ScenarioManager
extends Object

Loads performance testing scenarios and parses into usable components by the JON resource components.

Author:
Jason Dobies

Field Summary
static String SCENARIO_PROPERTY
          System property that must be set to indicate what scenario to use.
 
Method Summary
 CalltimeFactory getCalltimeFactory(String resourceTypeName)
           
 ContentFactory getContentFactory(String resourceTypeName, String packageTypeName)
          Returns the content factory defined in the scenario for discovering packages of the specified type.
static ScenarioManager getInstance()
          Returns an instance of this class.
 MeasurementFactory getMeasurementFactory(String resourceTypeName)
          Returns the measurement factory defined in the scenario for the specified resource type.
 ConfigurationFactory getPluginConfigurationFactory(String resourceTypeName)
          Returns the configuration factory defined in the scenario for creating plugin configurations for the specified resource type.
 ResourceFactory getResourceFactory(String resourceTypeName)
          Returns the resource factory defined in the scenario for the specified resource type.
 TraitFactory getTraitFactory(String resourceTypeName)
           
 boolean isEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCENARIO_PROPERTY

public static final String SCENARIO_PROPERTY
System property that must be set to indicate what scenario to use. The value of this property should be the file name of the scenario, minus the ".xml". For example, to use the scenario defined in high-servers.xml, this property should be set to "high-servers".

See Also:
Constant Field Values
Method Detail

getInstance

public static ScenarioManager getInstance()
Returns an instance of this class.

Returns:
instance of this class

isEnabled

public boolean isEnabled()

getResourceFactory

public ResourceFactory getResourceFactory(String resourceTypeName)
Returns the resource factory defined in the scenario for the specified resource type.

Parameters:
resourceTypeName - indicates which resource factory to return
Returns:
resource factory instance to use to generate the discovery for resources of this type; this will never be null.

getMeasurementFactory

public MeasurementFactory getMeasurementFactory(String resourceTypeName)
Returns the measurement factory defined in the scenario for the specified resource type.

Parameters:
resourceTypeName - indicates the resource for which we're retrieving metrics
Returns:
measurement factory instance used to generate measurement values; this will never be null.

getCalltimeFactory

public CalltimeFactory getCalltimeFactory(String resourceTypeName)

getTraitFactory

public TraitFactory getTraitFactory(String resourceTypeName)

getPluginConfigurationFactory

public ConfigurationFactory getPluginConfigurationFactory(String resourceTypeName)
Returns the configuration factory defined in the scenario for creating plugin configurations for the specified resource type.

Parameters:
resourceTypeName - indicates the resource for which we're retriving the plugin configuration
Returns:
configuration factory instance used to generate the plugin configurations; this may be null if the resource does not define a generator for its plugin configuration

getContentFactory

public ContentFactory getContentFactory(String resourceTypeName,
                                        String packageTypeName)
Returns the content factory defined in the scenario for discovering packages of the specified type.

Parameters:
resourceTypeName - indicates the resource in which the type is defined
packageTypeName - indicated the type being discovered
Returns:
factory used for discovery; this may be null if the scenario does not define a generator for a particular type


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