public abstract class PerformanceTimedTask extends TimerTask
Modifier and Type | Field and Description |
---|---|
protected WattDepotClient |
client
The client used to communicate with the WattDepot server.
|
protected boolean |
debug
Flag for debugging messages.
|
protected CollectorProcessDefinition |
definition
The definition about the collector.
|
protected Depository |
depository
The Depository for storing measurements.
|
protected Sensor |
sensor
The sensor to get the latest value for.
|
Constructor and Description |
---|
PerformanceTimedTask(String serverUri,
String username,
String orgId,
String password,
boolean debug)
Initializes the GetLatestValueTask.
|
PerformanceTimedTask(String serverUri,
String username,
String orgId,
String password,
boolean debug,
String collectorId)
Initializes the GetLatestValueTask.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
clientTask()
The client task to time.
|
Double |
getAverageTime() |
Long |
getMaxTime() |
Long |
getMinTime() |
Long |
getNumberOfRuns() |
Long |
getTotalTime() |
void |
run() |
cancel, scheduledExecutionTime
protected boolean debug
protected CollectorProcessDefinition definition
protected WattDepotClient client
protected Depository depository
protected Sensor sensor
public PerformanceTimedTask(String serverUri, String username, String orgId, String password, boolean debug) throws BadCredentialException, IdNotFoundException, BadSensorUriException
serverUri
- The URI for the WattDepot server.username
- The name of a user defined in the WattDepot server.orgId
- the id of the organization the user is in.password
- The password for the user.debug
- flag for debugging messages.BadCredentialException
- if the user or password don't match the
credentials in WattDepot.IdNotFoundException
- if the processId is not defined.BadSensorUriException
- if the Sensor's URI isn't valid.public PerformanceTimedTask(String serverUri, String username, String orgId, String password, boolean debug, String collectorId) throws BadCredentialException, IdNotFoundException, BadSensorUriException
serverUri
- The URI for the WattDepot server.username
- The name of a user defined in the WattDepot server.orgId
- the id of the organization the user is in.password
- The password for the user.debug
- flag for debugging messages.collectorId
- the CollectorProcessDefinition id.BadCredentialException
- if the user or password don't match the
credentials in WattDepot.IdNotFoundException
- if the processId is not defined.BadSensorUriException
- if the Sensor's URI isn't valid.public Double getAverageTime()
public Long getMaxTime()
public Long getMinTime()
public Long getNumberOfRuns()
public Long getTotalTime()
public abstract void clientTask()
Copyright © 2015 Collaborative Software Development Laboratory. All rights reserved.