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 optionValue)
Inject a option value into the set of configuration objects.
abstract void injectOptionValue(String optionName, String optionKey, 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
ICommandScheduler the ICommandScheduler. Will never return null.

public abstract Object getConfigurationObject (String typeName)

Gets the custom configuration object with given name.

Parameters
typeName String: the unique type of the configuration object
Returns
Object 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
IDeviceManager the IDeviceManager provided in the configuration.

public abstract List<IDeviceMonitor> getDeviceMonitors ()

Gets the list of IDeviceMonitor from the global config.

Returns
List<IDeviceMonitor> 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
IDeviceSelection the IDeviceSelection provided in the configuration.

public abstract List<IMultiDeviceRecovery> getMultiDeviceRecoveryHandlers ()

Gets the list of IMultiDeviceRecovery to use from the configuration.

Returns
List<IMultiDeviceRecovery> the list of IMultiDeviceRecovery, or null if not set.

public abstract List<String> getOptionValues (String optionName)

Get a list of option's values.

Parameters
optionName String: the map option name
Returns
List<String>

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
ITerribleFailureHandler the ITerribleFailureHandler provided in the configuration, or null if no handler is set

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 String: the option name
optionValue String: the option value(s)
Throws
ConfigurationException if failed to set the option's value

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 String: the map option name
optionKey String: the map option key
optionValue String: the map option value
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 String: the unique name of the config object type.
configObject Object: 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 String: the unique name of the config object type.
configList List: 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)

Set the IDeviceMonitor.

Parameters
deviceMonitor IDeviceMonitor: 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 List: the command line arguments
Returns
List<String> the unconsumed arguments
Throws
ConfigurationException

public abstract void setWtfHandler (ITerribleFailureHandler wtfHandler)

Set the ITerribleFailureHandler.

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