RecorderClient
public
class
RecorderClient
extends Object
implements
IRecorderClient
| java.lang.Object | |
| ↳ | com.android.tradefed.result.resultdb.RecorderClient |
ResultDB recorder client that uploads test results to ResultDB.
Summary
Constants | |
|---|---|
int |
SERVER_PORT
|
Public methods | |
|---|---|
static
IRecorderClient
|
create(String rootInvocationId, RootInvocation rootInvocation, WorkUnit rootWorkUnit, Boolean isStaging)
|
static
IRecorderClient
|
create(String rootInvocationId, String updateToken, Boolean isStaging)
|
void
|
enqueueArtifact(String workUnitId, Artifact artifact)
Enqueue an artifact to report to ResultDB. |
void
|
enqueueTestResult(String workunitId, TestResult result)
Enqueue a test result to report to ResultDB. |
void
|
enqueueWorkUnit(String parentId, String id, WorkUnit workUnit)
Enqueue a work unit to report to ResultDB. |
void
|
enqueueWorkUnitUpdate(WorkUnit workUnit, FieldMask updateMask)
Enqueue a work unit update to report to ResultDB. |
void
|
finalizeUpload()
Finalize the upload of test results, artifacts and work units. |
void
|
updateWorkUnit(WorkUnit workUnit, FieldMask updateMask)
Update a work unit in ResultDB. |
void
|
uploadArtifact(String workUnitId, Artifact artifact)
Upload an artifact to ResultDB. |
Constants
SERVER_PORT
public static final int SERVER_PORT
Constant Value: 443 (0x000001bb)
Public methods
create
public static IRecorderClient create (String rootInvocationId, RootInvocation rootInvocation, WorkUnit rootWorkUnit, Boolean isStaging)
| Parameters | |
|---|---|
rootInvocationId |
String |
rootInvocation |
RootInvocation |
rootWorkUnit |
WorkUnit |
isStaging |
Boolean |
| Returns | |
|---|---|
IRecorderClient |
|
create
public static IRecorderClient create (String rootInvocationId, String updateToken, Boolean isStaging)
| Parameters | |
|---|---|
rootInvocationId |
String |
updateToken |
String |
isStaging |
Boolean |
| Returns | |
|---|---|
IRecorderClient |
|
enqueueArtifact
public void enqueueArtifact (String workUnitId,
Artifact artifact)Enqueue an artifact to report to ResultDB.
| Parameters | |
|---|---|
workUnitId |
String: The work unit ID of the artifact. |
artifact |
Artifact: The artifact to upload in the CreateArtifactRequest. |
enqueueTestResult
public void enqueueTestResult (String workunitId,
TestResult result)Enqueue a test result to report to ResultDB.
| Parameters | |
|---|---|
workunitId |
String: The work unit ID of the test result. |
result |
TestResult: The test result to upload in the CreateTestResultRequest. |
enqueueWorkUnit
public void enqueueWorkUnit (String parentId,
String id,
WorkUnit workUnit)Enqueue a work unit to report to ResultDB.
| Parameters | |
|---|---|
parentId |
String: The parent ID of the work unit. |
id |
String: The ID of the work unit. |
workUnit |
WorkUnit: The work unit to upload in the CreateWorkUnitRequest. |
enqueueWorkUnitUpdate
public void enqueueWorkUnitUpdate (WorkUnit workUnit,
FieldMask updateMask)Enqueue a work unit update to report to ResultDB.
| Parameters | |
|---|---|
workUnit |
WorkUnit: The work unit to update in the UpdateWorkUnitRequest. |
updateMask |
FieldMask: The field mask for the update. |
finalizeUpload
public void finalizeUpload ()
Finalize the upload of test results, artifacts and work units. This method should be called after all resources have been enqueued. Any enqueueXXX calls after this method will be ignored.
updateWorkUnit
public void updateWorkUnit (WorkUnit workUnit,
FieldMask updateMask)Update a work unit in ResultDB.
| Parameters | |
|---|---|
workUnit |
WorkUnit: The work unit to update in the UpdateWorkUnitRequest. |
updateMask |
FieldMask: The field mask for the update. |
uploadArtifact
public void uploadArtifact (String workUnitId,
Artifact artifact)Upload an artifact to ResultDB.
| Parameters | |
|---|---|
workUnitId |
String: The work unit ID of the artifact. |
artifact |
Artifact: The artifact to upload in the CreateArtifactRequest. |