com.jakewharton.pingdom.services
Class SummaryPerformanceService.GetBuilder

java.lang.Object
  extended by com.jakewharton.apibuilder.ApiBuilder
      extended by com.jakewharton.pingdom.PingdomApiBuilder<SummaryPerformance>
          extended by com.jakewharton.pingdom.services.SummaryPerformanceService.GetBuilder
Enclosing class:
SummaryPerformanceService

public static final class SummaryPerformanceService.GetBuilder
extends PingdomApiBuilder<SummaryPerformance>

Request builder for SummaryPerformanceService.get(int).


Nested Class Summary
 
Nested classes/interfaces inherited from class com.jakewharton.pingdom.PingdomApiBuilder
PingdomApiBuilder.HttpMethod
 
Field Summary
 
Fields inherited from class com.jakewharton.apibuilder.ApiBuilder
API_URL_PLACEHOLDER_END, API_URL_PLACEHOLDER_START
 
Method Summary
protected  com.google.gson.JsonElement execute()
          Execute the remote API method and return the JSON object result.
 SummaryPerformanceService.GetBuilder from(Date from)
          Start time of period.
 SummaryPerformanceService.GetBuilder includeUptime(boolean includeUptime)
          Include uptime information.
 SummaryPerformanceService.GetBuilder probes(List<Integer> probes)
          Filter to only use results from a list of probes.
 SummaryPerformanceService.GetBuilder resolution(PerformanceResolution resolution)
          Interval size.
 SummaryPerformanceService.GetBuilder to(Date to)
          End time of period.
 
Methods inherited from class com.jakewharton.pingdom.PingdomApiBuilder
field, fire, parameter, parameter, parameter, parameter, postParameter, postParameter, postParameter, postParameter, postParameter
 
Methods inherited from class com.jakewharton.apibuilder.ApiBuilder
buildUrl, buildUrl, encodeUrl, field, field, field, field, field, hasField, hasParameter, parameter, parameter, parameter, parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

execute

protected com.google.gson.JsonElement execute()
Description copied from class: PingdomApiBuilder

Execute the remote API method and return the JSON object result.

This method can be overridden to select a specific subset of the JSON object. The overriding implementation should still call 'super.execute()' and then perform the filtering from there.

Overrides:
execute in class PingdomApiBuilder<SummaryPerformance>
Returns:
JSON object instance.

from

public SummaryPerformanceService.GetBuilder from(Date from)
Start time of period.

Parameters:
from - value.
Returns:
Builder instance.

to

public SummaryPerformanceService.GetBuilder to(Date to)
End time of period.

Parameters:
to - Value.
Returns:
Builder instance.

resolution

public SummaryPerformanceService.GetBuilder resolution(PerformanceResolution resolution)
Interval size.

Parameters:
resolution - Value.
Returns:
Builder instance.

includeUptime

public SummaryPerformanceService.GetBuilder includeUptime(boolean includeUptime)
Include uptime information.

Parameters:
includeUptime - Value.
Returns:
Builder instance.

probes

public SummaryPerformanceService.GetBuilder probes(List<Integer> probes)
Filter to only use results from a list of probes. Can not be used if includeuptime is set to true. Also note that this can cause intervals to be omitted, since there may be no results from the desired probes in them.

Parameters:
probes - List of probe IDs.
Returns:
Builder instance.


Copyright © 2011 Jake Wharton. All Rights Reserved.