ClusterCommandConfigBuilder

public class ClusterCommandConfigBuilder
extends Object

java.lang.Object
   ↳ com.android.tradefed.cluster.ClusterCommandConfigBuilder


A class to build a configuration file for a cluster command.

Summary

Public constructors

ClusterCommandConfigBuilder()

Public methods

File build()

Builds a configuration file.

ClusterCommandConfigBuilder setClusterCommand(ClusterCommand command)

Set a ClusterCommand object.

ClusterCommandConfigBuilder setTestContext(TestContext testContext)

Set a TestContext object.

ClusterCommandConfigBuilder setTestEnvironment(TestEnvironment testEnvironment)

Set a TestEnvironment object.

ClusterCommandConfigBuilder setTestResources( testResources)

Set a list of TestResource object.

ClusterCommandConfigBuilder setWorkDir(File workDir)

Set a work directory for a command.

Public constructors

ClusterCommandConfigBuilder

public ClusterCommandConfigBuilder ()

Public methods

build

public File build ()

Builds a configuration file.

Returns
File a ERROR(/File) object for a generated configuration file.

Throws
ConfigurationException
JSONException

setClusterCommand

public ClusterCommandConfigBuilder setClusterCommand (ClusterCommand command)

Set a ClusterCommand object.

Parameters
command ClusterCommand: a ClusterCommand object.

Returns
ClusterCommandConfigBuilder ClusterCommandConfigBuilder for chaining.

setTestContext

public ClusterCommandConfigBuilder setTestContext (TestContext testContext)

Set a TestContext object.

Parameters
testContext TestContext: a TestContext object.

Returns
ClusterCommandConfigBuilder ClusterCommandConfigBuilder for chaining.

setTestEnvironment

public ClusterCommandConfigBuilder setTestEnvironment (TestEnvironment testEnvironment)

Set a TestEnvironment object.

Parameters
testEnvironment TestEnvironment: a TestEnvironment object.

Returns
ClusterCommandConfigBuilder ClusterCommandConfigBuilder for chaining.

setTestResources

public ClusterCommandConfigBuilder setTestResources ( testResources)

Set a list of TestResource object.

Parameters
testResources : a list of TestResource objects.

Returns
ClusterCommandConfigBuilder ClusterCommandConfigBuilder for chaining.

setWorkDir

public ClusterCommandConfigBuilder setWorkDir (File workDir)

Set a work directory for a command.

Parameters
workDir File: a work directory.

Returns
ClusterCommandConfigBuilder ClusterCommandConfigBuilder for chaining.