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 ConfigurationFactory.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.

File getLatestDownloadedFile()

Protected methods

BufferedInputStream getConfigStream(String name)

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

ConfigurationDef getConfigurationDef(String name, boolean isGlobal, 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

getLatestDownloadedFile

public File getLatestDownloadedFile ()

Returns
File

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 ERROR(/BufferedInputStream) for reading config contents

Throws
ConfigurationException if config could not be found

getConfigurationDef

protected ConfigurationDef getConfigurationDef (String name, 
                boolean isGlobal, 
                 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 file to load

isGlobal boolean

templateMap

Returns
ConfigurationDef ConfigurationDef

Throws
ConfigurationException