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

StreamProtoReceiver

public class StreamProtoReceiver
extends Object

java.lang.Object
   ↳ com.android.tradefed.result.proto.StreamProtoReceiver


A receiver that translates proto TestRecord received into Tradefed events.

Summary

Public constructors

StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation)

Ctor.

StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing)

Ctor.

StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, String logNamePrefix)

Ctor.

StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, boolean reportLogs, String logNamePrefix)

Ctor.

Public methods

void close()
void completeModuleEvents()

If needed to ensure consistent reporting, complete the events of the module.

Throwable getError()

Returns the error caugh in the receiver thread.

int getSocketServerPort()

Returns the socket receiver that was open.

boolean joinReceiver(long millis)

Public constructors

StreamProtoReceiver

public StreamProtoReceiver (ITestInvocationListener listener, 
                IInvocationContext mainContext, 
                boolean reportInvocation)

Ctor.

Parameters
listener ITestInvocationListener: the ITestInvocationListener where to report the results.

mainContext IInvocationContext

reportInvocation boolean: Whether or not to report the invocation level events.

StreamProtoReceiver

public StreamProtoReceiver (ITestInvocationListener listener, 
                IInvocationContext mainContext, 
                boolean reportInvocation, 
                boolean quietParsing)

Ctor.

Parameters
listener ITestInvocationListener: the ITestInvocationListener where to report the results.

mainContext IInvocationContext

reportInvocation boolean: Whether or not to report the invocation level events.

quietParsing boolean: Whether or not to let the parser log debug information.

StreamProtoReceiver

public StreamProtoReceiver (ITestInvocationListener listener, 
                IInvocationContext mainContext, 
                boolean reportInvocation, 
                boolean quietParsing, 
                String logNamePrefix)

Ctor.

Parameters
listener ITestInvocationListener: the ITestInvocationListener where to report the results.

mainContext IInvocationContext

reportInvocation boolean: Whether or not to report the invocation level events.

quietParsing boolean: Whether or not to let the parser log debug information.

logNamePrefix String: The prefix for file logged through the parser.

StreamProtoReceiver

public StreamProtoReceiver (ITestInvocationListener listener, 
                IInvocationContext mainContext, 
                boolean reportInvocation, 
                boolean quietParsing, 
                boolean reportLogs, 
                String logNamePrefix)

Ctor.

Parameters
listener ITestInvocationListener: the ITestInvocationListener where to report the results.

mainContext IInvocationContext

reportInvocation boolean: Whether or not to report the invocation level events.

quietParsing boolean: Whether or not to let the parser log debug information.

reportLogs boolean: Whether or not to report the logs

logNamePrefix String: The prefix for file logged through the parser.

Public methods

close

public void close ()

completeModuleEvents

public void completeModuleEvents ()

If needed to ensure consistent reporting, complete the events of the module.

getError

public Throwable getError ()

Returns the error caugh in the receiver thread. If none it will return null.

Returns
Throwable

getSocketServerPort

public int getSocketServerPort ()

Returns the socket receiver that was open. -1 if none.

Returns
int

joinReceiver

public boolean joinReceiver (long millis)

Parameters
millis long

Returns
boolean