RemoteBuildInfo
public
class
RemoteBuildInfo
extends Object
| java.lang.Object | |
| ↳ | com.google.android.tradefed.build.RemoteBuildInfo |
Container for launch control build info response.
Summary
Constants | |
|---|---|
String |
UNKNOWN_BUILD_ID
|
Public methods | |
|---|---|
RemoteBuildInfo
|
clone()
|
String
|
getAttribute(RemoteBuildInfo.BuildAttributeKey key)
Retrieve a build attribute value from a pre-defined key. |
String
|
getAttribute(String key)
Retrieve a build attribute value from its launch control defined name. |
String
|
getBuildId()
Helper method to retrieve the build id. |
static
RemoteBuildInfo.BuildType
|
parseBuildType(String buildId)
Parse build type from build id. |
static
RemoteBuildInfo
|
parseRemoteBuildInfo(String serverResponse)
Parse a remote build info from the server response. |
String
|
toString()
|
Constants
UNKNOWN_BUILD_ID
public static final String UNKNOWN_BUILD_ID
Constant Value: "0"
Public methods
getAttribute
public String getAttribute (RemoteBuildInfo.BuildAttributeKey key)
Retrieve a build attribute value from a pre-defined key.
| Parameters | |
|---|---|
key |
RemoteBuildInfo.BuildAttributeKey: the BuildAttributeKey. |
| Returns | |
|---|---|
String |
the String build attribute value, or null if it cannot be found. |
getAttribute
public String getAttribute (String key)
Retrieve a build attribute value from its launch control defined name.
Its preferable to use getAttribute(com.google.android.tradefed.build.RemoteBuildInfo.BuildAttributeKey) instead.
| Parameters | |
|---|---|
key |
String: the String unique name of the attribute. |
| Returns | |
|---|---|
String |
the String build attribute value, or null if it cannot be found. |
getBuildId
public String getBuildId ()
Helper method to retrieve the build id.
| Returns | |
|---|---|
String |
the build id or UNKNOWN_BUILD_ID if build id was missing from server
response. |
parseBuildType
public static RemoteBuildInfo.BuildType parseBuildType (String buildId)
Parse build type from build id.
There are a number of different built types supported by the build server. External builds are prefixed by "E", local builds by "L", pending builds by "P", and mainline train builds by "T". All other builds are treated as submitted or post submit.
| Parameters | |
|---|---|
buildId |
String: The build ID |
| Returns | |
|---|---|
RemoteBuildInfo.BuildType |
The BuildType. |
parseRemoteBuildInfo
public static RemoteBuildInfo parseRemoteBuildInfo (String serverResponse)
Parse a remote build info from the server response.
Expected return result is one or more lines of build_attribute_name:value
pairs
| Parameters | |
|---|---|
serverResponse |
String: the String launch control response to be parsed |
| Returns | |
|---|---|
RemoteBuildInfo |
a RemoteBuildInfo or null if no build is available. |
| Throws | |
|---|---|
|
if server response is invalid |
toString
public String toString ()
| Returns | |
|---|---|
String |
|