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()

返回用于标识要访问的 IHostMonitor 的“类”的标记。

void run()
void terminate()

一种用于停止主机监控器的方法。

字段

mHostData

protected Map<String, String> mHostData

mHostEvents

protected Queue<IHostMonitor.HostDataPoint> mHostEvents

公共构造函数

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

run

public void run ()

terminate

public void terminate ()

一种用于停止主机监控器的方法。