StreamProtoReceiver

public class StreamProtoReceiver
extends Object

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


מקלט שמתרגם את proto TestRecord שהתקבל לאירועים של Tradefed.

סיכום

שדות

protected AtomicBoolean mStopParsing

המערכת תפסיק לנתח אירועים כשהאפשרות הזו מוגדרת.

יוצרים ציבוריים

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.

שיטות ציבוריות

void close()
void completeModuleEvents()

אם צריך, כדי להבטיח דיווח עקבי, יש להשלים את האירועים של המודול.

Throwable getError()

הפונקציה מחזירה את השגיאה שנתפסה בשרשור המקבל.

int getSocketServerPort()

הפונקציה מחזירה את מקלט השקע שהיה פתוח.

boolean hasInvocationFailed()

הפונקציה מחזירה את הסטטוס של הדיווח על קריאה שנכשלה.

boolean joinReceiver(long millis)

שיטות מוגנות

long getJoinTimeout(long millis)

שדות

mStopParsing

protected AtomicBoolean mStopParsing

המערכת תפסיק לנתח אירועים כשהאפשרות הזו מוגדרת. כך אפשר למנוע ניתוח של האירועים בשרשור כשאנחנו לא מצפים להם יותר.

יוצרים ציבוריים

StreamProtoReceiver

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

ctor.

פרמטרים
listener ITestInvocationListener: ה-ITestInvocationListener שבו יש לדווח על התוצאות.

mainContext IInvocationContext

reportInvocation boolean: האם לדווח על האירועים ברמת ההפעלה.

זריקות
IOException

StreamProtoReceiver

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

ctor.

פרמטרים
listener ITestInvocationListener: ה-ITestInvocationListener שבו יש לדווח על התוצאות.

mainContext IInvocationContext

reportInvocation boolean: האם לדווח על האירועים ברמת ההפעלה.

quietParsing boolean: האם לאפשר למנתח לתעד ביומן מידע על ניפוי באגים.

זריקות
IOException

StreamProtoReceiver

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

פרמטרים
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.

פרמטרים
listener ITestInvocationListener: ה-ITestInvocationListener שבו יש לדווח על התוצאות.

mainContext IInvocationContext

reportInvocation boolean: האם לדווח על האירועים ברמת ההפעלה.

quietParsing boolean: האם לאפשר למנתח לתעד ביומן מידע על ניפוי באגים.

reportLogs boolean: האם לדווח על היומנים או לא

logNamePrefix String: הקידומת של הקובץ שמתועד ביומן באמצעות המנתח.

mergeInvocationMetrics boolean

זריקות
IOException

StreamProtoReceiver

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

ctor.

פרמטרים
listener ITestInvocationListener: ה-ITestInvocationListener שבו יש לדווח על התוצאות.

mainContext IInvocationContext

reportInvocation boolean: האם לדווח על האירועים ברמת ההפעלה.

quietParsing boolean: האם לאפשר למנתח לתעד ביומן מידע על ניפוי באגים.

logNamePrefix String: הקידומת של הקובץ שמתועד ביומן באמצעות המנתח.

זריקות
IOException

שיטות ציבוריות

סגירה

public void close ()

completeModuleEvents

public void completeModuleEvents ()

אם צריך, כדי להבטיח דיווח עקבי, יש להשלים את האירועים של המודול.

getError

public Throwable getError ()

הפונקציה מחזירה את השגיאה שנתפסה בשרשור המקבל. אם לא נמצאה התאמה, הפונקציה תחזיר null.

החזרות
Throwable

getSocketServerPort

public int getSocketServerPort ()

הפונקציה מחזירה את מקלט השקע שהיה פתוח. -1 אם לא קיים.

החזרות
int

hasInvocationFailed

public boolean hasInvocationFailed ()

הפונקציה מחזירה את הסטטוס של הדיווח על קריאה שנכשלה.

החזרות
boolean

joinReceiver

public boolean joinReceiver (long millis)

פרמטרים
millis long

החזרות
boolean

שיטות מוגנות

getJoinTimeout

protected long getJoinTimeout (long millis)

פרמטרים
millis long

החזרות
long