ResultForwarder
  public
  
  
  
  class
  ResultForwarder
  
    extends Object
  
  
  
  
  
      implements
      
        ITestInvocationListener
      
  
  
| java.lang.Object | |
| ↳ | com.android.tradefed.result.ResultForwarder | 
A ITestInvocationListener that forwards invocation results to a list of other listeners.
Summary
| Public constructors | |
|---|---|
| 
      ResultForwarder(Create a  | |
| 
      ResultForwarder(ITestInvocationListener... listeners)
      Alternate variable arg constructor for  | |
| Protected constructors | |
|---|---|
| 
      ResultForwarder()
      Create a  | |
| Public methods | |
|---|---|
| 
        
        
        
        
        
        TestSummary | 
      getSummary()
      
 | 
| 
        
        
        
        
        
        void | 
      invocationEnded(long elapsedTime)
      
 | 
| 
        
        
        
        
        
        void | 
      invocationFailed(FailureDescription failure)
      
 | 
| 
        
        
        
        
        
        void | 
      invocationFailed(Throwable cause)
      
 | 
| 
        
        
        
        
        
        void | 
      invocationStarted(IInvocationContext context)
      
 | 
| 
        
        
        
        
        
        void | 
      testAssumptionFailure(TestDescription test, String trace)
       | 
| 
        
        
        
        
        
        void | 
      testAssumptionFailure(TestDescription test, FailureDescription failure)
       | 
| 
        
        
        
        
        
        void | 
      testEnded(TestDescription test, long endTime, 
 | 
| 
        
        
        
        
        
        void | 
      testEnded(TestDescription test, 
 | 
| 
        
        
        
        
        
        void | 
      testFailed(TestDescription test, FailureDescription failure)
      
 | 
| 
        
        
        
        
        
        void | 
      testFailed(TestDescription test, String trace)
      
 | 
| 
        
        
        
        
        
        void | 
      testIgnored(TestDescription test)
       | 
| 
        
        
        
        
        
        void | 
      testLog(String dataName, LogDataType dataType, InputStreamSource dataStream)
      
 | 
| 
        
        
        
        
        
        void | 
      testModuleEnded()
       | 
| 
        
        
        
        
        
        void | 
      testModuleStarted(IInvocationContext moduleContext)
       | 
| 
        
        
        
        
        
        void | 
      testRunEnded(long elapsedTime, 
 | 
| 
        
        
        
        
        
        void | 
      testRunFailed(FailureDescription failure)
      
 | 
| 
        
        
        
        
        
        void | 
      testRunFailed(String errorMessage)
      
 | 
| 
        
        
        
        
        
        void | 
      testRunStarted(String runName, int testCount, int attemptNumber)
      
 | 
| 
        
        
        
        
        
        void | 
      testRunStarted(String runName, int testCount)
      
 | 
| 
        
        
        
        
        
        void | 
      testRunStarted(String runName, int testCount, int attemptNumber, long startTime)
      
 | 
| 
        
        
        
        
        
        void | 
      testRunStopped(long elapsedTime)
      
 | 
| 
        
        
        
        
        
        void | 
      testStarted(TestDescription test, long startTime)
      
 | 
| 
        
        
        
        
        
        void | 
      testStarted(TestDescription test)
      
 | 
| Protected methods | |
|---|---|
| 
        
        
        
        
        
         | 
      getListeners()
      Get the list of listeners. | 
| 
        
        
        
        
        
        void | 
      setListeners(Set the listeners after construction. | 
| 
        
        
        
        
        
        void | 
      setListeners(ITestInvocationListener... listeners)
      Set the listeners after construction. | 
Public constructors
ResultForwarder
public ResultForwarder (listeners) 
Create a ResultForwarder.
| Parameters | |
|---|---|
| listeners | : the realITestInvocationListeners to forward results to | 
ResultForwarder
public ResultForwarder (ITestInvocationListener... listeners)
Alternate variable arg constructor for ResultForwarder.
| Parameters | |
|---|---|
| listeners | ITestInvocationListener: the realITestInvocationListeners to forward results to | 
Protected constructors
ResultForwarder
protected ResultForwarder ()
Create a ResultForwarder with deferred listener setting.  Intended only for use by
 subclasses.
Public methods
getSummary
public TestSummary getSummary ()
| Returns | |
|---|---|
| TestSummary | |
invocationEnded
public void invocationEnded (long elapsedTime)
| Parameters | |
|---|---|
| elapsedTime | long | 
invocationFailed
public void invocationFailed (FailureDescription failure)
| Parameters | |
|---|---|
| failure | FailureDescription | 
invocationFailed
public void invocationFailed (Throwable cause)
| Parameters | |
|---|---|
| cause | Throwable | 
invocationStarted
public void invocationStarted (IInvocationContext context)
| Parameters | |
|---|---|
| context | IInvocationContext | 
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, 
                String trace)| Parameters | |
|---|---|
| test | TestDescription | 
| trace | String | 
testAssumptionFailure
public void testAssumptionFailure (TestDescription test, 
                FailureDescription failure)| Parameters | |
|---|---|
| test | TestDescription | 
| failure | FailureDescription | 
testEnded
public void testEnded (TestDescription test, 
                long endTime, 
                 testMetrics) 
| Parameters | |
|---|---|
| test | TestDescription | 
| endTime | long | 
| testMetrics |  | 
testEnded
public void testEnded (TestDescription test, 
                 testMetrics) 
| Parameters | |
|---|---|
| test | TestDescription | 
| testMetrics |  | 
testFailed
public void testFailed (TestDescription test, 
                FailureDescription failure)
| Parameters | |
|---|---|
| test | TestDescription | 
| failure | FailureDescription | 
testFailed
public void testFailed (TestDescription test, 
                String trace)
| Parameters | |
|---|---|
| test | TestDescription | 
| trace | String | 
testIgnored
public void testIgnored (TestDescription test)
| Parameters | |
|---|---|
| test | TestDescription | 
testLog
public void testLog (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)
| Parameters | |
|---|---|
| dataName | String | 
| dataType | LogDataType | 
| dataStream | InputStreamSource | 
testModuleEnded
public void testModuleEnded ()
testModuleStarted
public void testModuleStarted (IInvocationContext moduleContext)
| Parameters | |
|---|---|
| moduleContext | IInvocationContext | 
testRunEnded
public void testRunEnded (long elapsedTime, 
                 runMetrics) 
| Parameters | |
|---|---|
| elapsedTime | long | 
| runMetrics |  | 
testRunFailed
public void testRunFailed (FailureDescription failure)
| Parameters | |
|---|---|
| failure | FailureDescription | 
testRunFailed
public void testRunFailed (String errorMessage)
| Parameters | |
|---|---|
| errorMessage | String | 
testRunStarted
public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber)
| Parameters | |
|---|---|
| runName | String | 
| testCount | int | 
| attemptNumber | int | 
testRunStarted
public void testRunStarted (String runName, 
                int testCount)
| Parameters | |
|---|---|
| runName | String | 
| testCount | int | 
testRunStarted
public void testRunStarted (String runName, 
                int testCount, 
                int attemptNumber, 
                long startTime)
| Parameters | |
|---|---|
| runName | String | 
| testCount | int | 
| attemptNumber | int | 
| startTime | long | 
testRunStopped
public void testRunStopped (long elapsedTime)
| Parameters | |
|---|---|
| elapsedTime | long | 
testStarted
public void testStarted (TestDescription test, 
                long startTime)
| Parameters | |
|---|---|
| test | TestDescription | 
| startTime | long | 
testStarted
public void testStarted (TestDescription test)
| Parameters | |
|---|---|
| test | TestDescription | 
Protected methods
getListeners
protectedgetListeners () 
Get the list of listeners. Intended only for use by subclasses.
| Returns | |
|---|---|
|  | The list of ITestInvocationListeners. | 
setListeners
protected void setListeners (listeners) 
Set the listeners after construction. Intended only for use by subclasses.
| Parameters | |
|---|---|
| listeners | : the realITestInvocationListeners to forward results to | 
setListeners
protected void setListeners (ITestInvocationListener... listeners)
Set the listeners after construction. Intended only for use by subclasses.
| Parameters | |
|---|---|
| listeners | ITestInvocationListener: the realITestInvocationListeners to forward results to | 
