ShardMainResultForwarder

public class ShardMainResultForwarder
extends ResultForwarder implements ILogSaverListener

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.invoker.ShardMainResultForwarder


將分割測試叫用作業的結果合併的 ResultForwarder。只有在所有分割的叫用作業完成後,才會向監聽器回報叫用作業完成。

這個類別不安全。在傳送測試結果時,用戶端應鎖定此類別,以免呼叫回呼順序錯亂。

摘要

公用建構函式

ShardMainResultForwarder( listeners, int expectedShards)

建立 ShardMainResultForwarder

公用方法

void invocationEnded(long elapsedTime)

void invocationEnded(long elapsedTime, IInvocationContext context)

更詳細的回呼,可區分哪個區塊已完成。

void invocationFailed(FailureDescription failure)

void invocationFailed(Throwable cause)

void invocationStarted(IInvocationContext context)

void logAssociation(String dataName, LogFile logFile)

void testLogForward(String dataName, LogDataType dataType, InputStreamSource dataStream)

只轉送 testLog,而非先儲存記錄。

void testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)

公用建構函式

ShardMainResultForwarder

public ShardMainResultForwarder ( listeners, 
                int expectedShards)

建立 ShardMainResultForwarder

參數
listeners :當所有分割區完成時,要轉送結果的 ITestInvocationListener 清單

expectedShards int:分割區數量

公用方法

invocationEnded

public void invocationEnded (long elapsedTime)

參數
elapsedTime long

invocationEnded

public void invocationEnded (long elapsedTime, 
                IInvocationContext context)

更詳細的回呼,可區分哪個區塊已完成。

參數
elapsedTime long

context IInvocationContext

invocationFailed

public void invocationFailed (FailureDescription failure)

參數
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

參數
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

參數
context IInvocationContext

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

參數
dataName String

logFile LogFile

testLogForward

public void testLogForward (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

只轉送 testLog,而非先儲存記錄。

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

參數
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile