AbstractHostMonitor
public
abstract
class
AbstractHostMonitor
extends Thread
implements
IHostMonitor
| java.lang.Object | ||
| ↳ | java.lang.Thread | |
| ↳ | com.android.tradefed.util.hostmetric.AbstractHostMonitor | |
主機健康狀態監控的典型類別。實作 dispatch() 時,請提供代理程式的詳細資料。
摘要
欄位 | |
|---|---|
protected
Map<String, String> |
mHostData
|
protected
Queue<IHostMonitor.HostDataPoint> |
mHostEvents
|
公用建構函式 | |
|---|---|
AbstractHostMonitor()
|
|
公用方法 | |
|---|---|
void
|
addHostEvent(IHostMonitor.HostMetricType tag, IHostMonitor.HostDataPoint event)
這個方法會呼叫,以便新增要傳送的特殊事件。 |
abstract
void
|
dispatch()
收集並發出目前的主機資料值。 |
IHostMonitor.HostMetricType
|
getTag()
傳回標記,指出要觸及的「類別」 |
void
|
run()
|
void
|
terminate()
系統會呼叫此方法來停止主機監控器。 |
欄位
mHostData
protected Map<String, String> mHostData
公用建構函式
AbstractHostMonitor
public AbstractHostMonitor ()
公用方法
addHostEvent
public void addHostEvent (IHostMonitor.HostMetricType tag, IHostMonitor.HostDataPoint event)
系統會呼叫這個方法,加入要傳送的特殊事件。
| 參數 | |
|---|---|
tag |
IHostMonitor.HostMetricType |
event |
IHostMonitor.HostDataPoint |
分派
public abstract void dispatch ()
收集並發出目前的主機資料值。如有任何佇列事件,應發出這些事件。
getTag
public IHostMonitor.HostMetricType getTag ()
傳回標記,指出要觸及的「類別」IHostMonitor。
| 傳回 | |
|---|---|
IHostMonitor.HostMetricType |
|
得分
public void run ()
終止
public void terminate ()
系統會呼叫此方法來停止主機監控器。