AbstractHostMonitor

public abstract class AbstractHostMonitor
extends Thread implements IHostMonitor

java.lang.Object
   ↳ java.lang.Thread
     ↳ com.android.tradefed.util.hostmetric.AbstractHostMonitor


Typical class for Host Health Monitoring. implementing dispatch() with specifics of the agent.

Summary

Fields

protected Map<String, String> mHostData

protected Queue<IHostMonitor.HostDataPoint> mHostEvents

Public constructors

AbstractHostMonitor()

Public methods

void addHostEvent(IHostMonitor.HostMetricType tag, IHostMonitor.HostDataPoint event)

A method that will be called to add a special event to be sent.

abstract void dispatch()

Collect and Emits the current host data values.

IHostMonitor.HostMetricType getTag()

Return the tag identifying which 'class' of IHostMonitor to reach.

void run()
void terminate()

A method that will be called to stop the Host Monitor.

Fields

mHostData

protected Map<String, String> mHostData

mHostEvents

protected Queue<IHostMonitor.HostDataPoint> mHostEvents

Public constructors

AbstractHostMonitor

public AbstractHostMonitor ()

Public methods

addHostEvent

public void addHostEvent (IHostMonitor.HostMetricType tag, 
                IHostMonitor.HostDataPoint event)

A method that will be called to add a special event to be sent.

Parameters
tag IHostMonitor.HostMetricType

event IHostMonitor.HostDataPoint

dispatch

public abstract void dispatch ()

Collect and Emits the current host data values. Should emits the Events of the Queue if any.

getTag

public IHostMonitor.HostMetricType getTag ()

Return the tag identifying which 'class' of IHostMonitor to reach.

Returns
IHostMonitor.HostMetricType

run

public void run ()

terminate

public void terminate ()

A method that will be called to stop the Host Monitor.