to top
public interface

IGlobalConfiguration

com.android.tradefed.config.IGlobalConfiguration
Known Indirect Subclasses

Class Overview

A class to encompass global configuration information for a single Trade Federation instance (encompassing any number of invocations of actual configurations).

Summary

Public Methods
abstract ICommandScheduler getCommandScheduler()
Gets the ICommandScheduler to use from the configuration.
abstract Object getConfigurationObject(String typeName)
Gets the custom configuration object with given name.
abstract IDeviceManager getDeviceManager()
Gets the IDeviceManager to use from the configuration.
abstract List<IDeviceMonitor> getDeviceMonitors()
Gets the list of IDeviceMonitor from the global config.
abstract IDeviceSelection getDeviceRequirements()
Gets the IDeviceSelection to use from the configuration.
abstract List<IMultiDeviceRecovery> getMultiDeviceRecoveryHandlers()
Gets the list of IMultiDeviceRecovery to use from the configuration.
abstract List<String> getOptionValues(String optionName)
Get a list of option's values.
abstract ITerribleFailureHandler getWtfHandler()
Gets the ITerribleFailureHandler to use from the configuration.
abstract void injectOptionValue(String optionName, String optionKey, String optionValue)
Inject a option value into the set of configuration objects.
abstract void injectOptionValue(String optionName, String optionValue)
Inject a option value into the set of configuration objects.
abstract void setCommandScheduler(ICommandScheduler scheduler)
Set the ICommandScheduler, replacing any existing values.
abstract void setConfigurationObject(String name, Object configObject)
Generic method to set the config object with the given name, replacing any existing value.
abstract void setConfigurationObjectList(String typeName, List<?> configList)
Generic method to set the config object list for the given name, replacing any existing value.
abstract void setDeviceManager(IDeviceManager deviceManager)
Set the IDeviceManager, replacing any existing values.
abstract void setDeviceMonitor(IDeviceMonitor deviceMonitor)
abstract void setDeviceRequirements(IDeviceSelection deviceSelection)
Set the IDeviceSelection, replacing any existing values.
abstract List<String> setOptionsFromCommandLineArgs(List<String> listArgs)
Set the global config Option fields with given set of command line arguments

abstract void setWtfHandler(ITerribleFailureHandler wtfHandler)

Public Methods

public abstract ICommandScheduler getCommandScheduler ()

Gets the ICommandScheduler to use from the configuration.

Returns

public abstract Object getConfigurationObject (String typeName)

Gets the custom configuration object with given name.

Parameters
typeName the unique type of the configuration object
Returns
  • the object or null if object with that name is not found

public abstract IDeviceManager getDeviceManager ()

Gets the IDeviceManager to use from the configuration. Manages the set of available devices for testing

Returns

public abstract List<IDeviceMonitor> getDeviceMonitors ()

Gets the list of IDeviceMonitor from the global config.

Returns
  • the list of IDeviceMonitor from the global config, or null if none was specified.

public abstract IDeviceSelection getDeviceRequirements ()

Gets the IDeviceSelection to use from the configuration. Represents a global filter on which devices the DeviceManager can see.

Returns

public abstract List<IMultiDeviceRecovery> getMultiDeviceRecoveryHandlers ()

Gets the list of IMultiDeviceRecovery to use from the configuration.

Returns

public abstract List<String> getOptionValues (String optionName)

Get a list of option's values.

Parameters
optionName the map option name

public abstract ITerribleFailureHandler getWtfHandler ()

Gets the ITerribleFailureHandler to use from the configuration. Handles what to do in the event that a WTF (What a Terrible Failure) occurs.

Returns

public abstract void injectOptionValue (String optionName, String optionKey, String optionValue)

Inject a option value into the set of configuration objects.

Useful to provide values for options that are generated dynamically.

Parameters
optionName the map option name
optionKey the map option key
optionValue the map option value
Throws
ConfigurationException if failed to set the option's value

public abstract void injectOptionValue (String optionName, String optionValue)

Inject a option value into the set of configuration objects.

Useful to provide values for options that are generated dynamically.

Parameters
optionName the option name
optionValue the option value(s)
Throws
ConfigurationException if failed to set the option's value

public abstract void setCommandScheduler (ICommandScheduler scheduler)

Set the ICommandScheduler, replacing any existing values.

public abstract void setConfigurationObject (String name, Object configObject)

Generic method to set the config object with the given name, replacing any existing value.

Parameters
name the unique name of the config object type.
configObject the config object
Throws
ConfigurationException if the configObject was not the correct type

public abstract void setConfigurationObjectList (String typeName, List<?> configList)

Generic method to set the config object list for the given name, replacing any existing value.

Parameters
typeName the unique name of the config object type.
configList the config object list
Throws
ConfigurationException if any objects in the list are not the correct type

public abstract void setDeviceManager (IDeviceManager deviceManager)

Set the IDeviceManager, replacing any existing values. This sets the manager for the test devices

public abstract void setDeviceMonitor (IDeviceMonitor deviceMonitor)

Parameters
deviceMonitor The monitor
Throws
ConfigurationException if an IDeviceMonitor has already been set.

public abstract void setDeviceRequirements (IDeviceSelection deviceSelection)

Set the IDeviceSelection, replacing any existing values. This sets a global device filter on which devices the DeviceManager can see.

public abstract List<String> setOptionsFromCommandLineArgs (List<String> listArgs)

Set the global config Option fields with given set of command line arguments

Parameters
listArgs the command line arguments
Returns
  • the unconsumed arguments

public abstract void setWtfHandler (ITerribleFailureHandler wtfHandler)

Parameters
wtfHandler the WTF handler
Throws
ConfigurationException if an ITerribleFailureHandler has already been set.