AbstractHostMonitor

public abstract class AbstractHostMonitor
extends Thread implements IHostMonitor

java.lang.Object
   ↳ java.lang.Thread
     ↳ com.android.tradefed.util.hostmetric.AbstractHostMonitor
Known Direct Subclasses
HeapHostMonitor AbstractHostMonitor implementation that monitors the heap memory on the host and log it periodically to the history log. 


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

Map<String, String> mHostData

mHostEvents

Queue<IHostMonitor.HostDataPoint> mHostEvents

Public constructors

AbstractHostMonitor

AbstractHostMonitor ()

Public methods

addHostEvent

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

void dispatch ()

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

getTag

IHostMonitor.HostMetricType getTag ()

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

Returns
IHostMonitor.HostMetricType

run

void run ()

terminate

void terminate ()

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