GCSConfigurationFactory

public class GCSConfigurationFactory
extends ConfigurationFactory

java.lang.Object
   ↳ com.android.tradefed.config.ConfigurationFactory
     ↳ com.android.tradefed.config.gcs.GCSConfigurationFactory


A ConfigurationFactory loads configs from Google Cloud Storage.

Summary

Nested classes

class GCSConfigurationFactory.GCSConfigLoader

Extension of ERROR(/ConfigLoader) that loads config from GCS, tracks the included configurations from one root config, and throws an exception on circular includes. 

Public methods

static IConfigurationFactory getInstance(IConfigurationServer configServer)

Get the singleton IConfigurationFactory instance.

Protected methods

BufferedInputStream getConfigStream(String name)

Loads an InputStream for given config name from Google Cloud Storage(GCS).

ConfigurationDef getConfigurationDef(String name, boolean isGlobal, Map<String, String> templateMap)

Retrieve the ConfigurationDef for the given name

Public methods

getInstance

public static IConfigurationFactory getInstance (IConfigurationServer configServer)

Get the singleton IConfigurationFactory instance.

Parameters
configServer IConfigurationServer

Returns
IConfigurationFactory

Protected methods

getConfigStream

protected BufferedInputStream getConfigStream (String name)

Loads an InputStream for given config name from Google Cloud Storage(GCS).

Parameters
name String: the configuration name to load

Returns
BufferedInputStream a BufferedInputStream for reading config contents

Throws
ConfigurationException if config could not be found

getConfigurationDef

protected ConfigurationDef getConfigurationDef (String name, 
                boolean isGlobal, 
                Map<String, String> templateMap)

Retrieve the ConfigurationDef for the given name

Parameters
name String: the name of a built-in configuration to load or a file path to configuration xml to load

isGlobal boolean

templateMap Map

Returns
ConfigurationDef ConfigurationDef

Throws
ConfigurationException