StreamProtoReceiver
public
class
StreamProtoReceiver
extends Object
java.lang.Object | |
↳ | com.android.tradefed.result.proto.StreamProtoReceiver |
將收到的 proto TestRecord 轉譯為 Tradefed 事件的接收器。
摘要
公用建構函式 | |
---|---|
StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation)
建構函式。 |
|
StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing)
建構函式。 |
|
StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, String logNamePrefix)
建構函式。 |
|
StreamProtoReceiver(ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, boolean reportLogs, String logNamePrefix)
建構函式。 |
公用方法 | |
---|---|
void
|
close()
|
void
|
completeModuleEvents()
如有需要,請完成單元中的事件,以便確保回報資料一致。 |
Throwable
|
getError()
傳回在接收器執行緒中偵測到的錯誤。 |
int
|
getSocketServerPort()
傳回已開啟的 Socket 接收器。 |
boolean
|
hasInvocationFailed()
傳回是否已回報叫用失敗。 |
boolean
|
joinReceiver(long millis)
|
公用建構函式
StreamProtoReceiver
public StreamProtoReceiver (ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation)
建構函式。
參數 | |
---|---|
listener |
ITestInvocationListener :回報結果的 ITestInvocationListener 。 |
mainContext |
IInvocationContext |
reportInvocation |
boolean :是否要回報叫用層級事件。 |
StreamProtoReceiver
public StreamProtoReceiver (ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing)
建構函式。
參數 | |
---|---|
listener |
ITestInvocationListener :回報結果的 ITestInvocationListener 。 |
mainContext |
IInvocationContext |
reportInvocation |
boolean :是否要回報叫用層級事件。 |
quietParsing |
boolean :是否讓剖析器記錄偵錯資訊。 |
StreamProtoReceiver
public StreamProtoReceiver (ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, String logNamePrefix)
建構函式。
參數 | |
---|---|
listener |
ITestInvocationListener :回報結果的 ITestInvocationListener 。 |
mainContext |
IInvocationContext |
reportInvocation |
boolean :是否要回報叫用層級事件。 |
quietParsing |
boolean :是否讓剖析器記錄偵錯資訊。 |
logNamePrefix |
String :透過剖析器記錄的檔案前置字串。 |
StreamProtoReceiver
public StreamProtoReceiver (ITestInvocationListener listener, IInvocationContext mainContext, boolean reportInvocation, boolean quietParsing, boolean reportLogs, String logNamePrefix)
建構函式。
參數 | |
---|---|
listener |
ITestInvocationListener :回報結果的 ITestInvocationListener 。 |
mainContext |
IInvocationContext |
reportInvocation |
boolean :是否要回報叫用層級事件。 |
quietParsing |
boolean :是否讓剖析器記錄偵錯資訊。 |
reportLogs |
boolean :是否回報記錄 |
logNamePrefix |
String :透過剖析器記錄的檔案前置字串。 |
公用方法
關閉
public void close ()
completeModuleEvents
public void completeModuleEvents ()
如有需要,請完成模組的事件,以便確保回報資料一致。
getError
public Throwable getError ()
傳回在接收器執行緒中偵測到的錯誤。如果沒有,則會傳回空值。
傳回 | |
---|---|
Throwable |
getSocketServerPort
public int getSocketServerPort ()
傳回已開啟的 Socket 接收器。如果沒有,則為 -1。
傳回 | |
---|---|
int |
hasInvocationFailed
public boolean hasInvocationFailed ()
傳回是否已回報叫用失敗。
傳回 | |
---|---|
boolean |
joinReceiver
public boolean joinReceiver (long millis)
參數 | |
---|---|
millis |
long |
傳回 | |
---|---|
boolean |