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
Fields |
protected
AtomicBoolean |
mStopParsing
Stop parsing events when this is set.
|
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, boolean reportLogs, String logNamePrefix)
|
StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, boolean reportLogs, String logNamePrefix, boolean mergeInvocationMetrics)
Ctor.
|
StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, String logNamePrefix)
Ctor.
|
Fields
mStopParsing
protected AtomicBoolean mStopParsing
Stop parsing events when this is set. This allows to avoid a thread parsing the events when
we don't expect them anymore.
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,
boolean reportLogs,
String logNamePrefix)
Parameters |
listener |
ITestInvocationListener |
mainContext |
IInvocationContext |
reportInvocation |
boolean |
quietParsing |
boolean |
reportLogs |
boolean |
logNamePrefix |
String |
StreamProtoReceiver
public StreamProtoReceiver (ITestInvocationListener listener,
IInvocationContext mainContext,
boolean reportInvocation,
boolean quietParsing,
boolean reportLogs,
String logNamePrefix,
boolean mergeInvocationMetrics)
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. |
mergeInvocationMetrics |
boolean |
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. |
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.
getSocketServerPort
public int getSocketServerPort ()
Returns the socket receiver that was open. -1 if none.
hasInvocationFailed
public boolean hasInvocationFailed ()
Returns whether or not the invocation failed has been reported.
joinReceiver
public boolean joinReceiver (long millis)
Protected methods
getJoinTimeout
protected long getJoinTimeout (long millis)