Google is committed to advancing racial equity for Black communities. See how.

LogSaverResultForwarder

public class LogSaverResultForwarder
extends ResultForwarder implements ILogSaverListener

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.result.LogSaverResultForwarder


A ResultForwarder for saving logs with the global file saver.

Summary

Public constructors

LogSaverResultForwarder(ILogSaver logSaver, listeners)

Public methods

void invocationEnded(long elapsedTime)

void invocationStarted(IInvocationContext context)

void logAssociation(String dataName, LogFile logFile)

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

Also, save the log file with the global ILogSaver and call ILogSaverListener#testLogSaved(String, LogDataType, InputStreamSource, LogFile) for those listeners implementing the ILogSaverListener interface.

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

Only forward the testLog instead of saving the log first.

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

If LogSaverResultForwarder is wrap in another one, ensure we forward the testLogSaved callback to the listeners under it.

Public constructors

LogSaverResultForwarder

public LogSaverResultForwarder (ILogSaver logSaver, 
                 listeners)

Parameters
logSaver ILogSaver

listeners

Public methods

invocationEnded

public void invocationEnded (long elapsedTime)

Parameters
elapsedTime long

invocationStarted

public void invocationStarted (IInvocationContext context)

Parameters
context IInvocationContext

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

Parameters
dataName String

logFile LogFile

testLog

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

Also, save the log file with the global ILogSaver and call ILogSaverListener#testLogSaved(String, LogDataType, InputStreamSource, LogFile) for those listeners implementing the ILogSaverListener interface.

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogForward

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

Only forward the testLog instead of saving the log first.

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

If LogSaverResultForwarder is wrap in another one, ensure we forward the testLogSaved callback to the listeners under it.

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile