com.xerox.amazonws.monitoring
Class Monitoring

java.lang.Object
  extended by com.xerox.amazonws.common.AWSConnection
      extended by com.xerox.amazonws.common.AWSQueryConnection
          extended by com.xerox.amazonws.monitoring.Monitoring

public class Monitoring
extends AWSQueryConnection

A Java wrapper for the Monitoring web services API


Field Summary
 
Fields inherited from class com.xerox.amazonws.common.AWSConnection
headers
 
Constructor Summary
Monitoring(String awsAccessId, String awsSecretKey)
          Initializes the ec2 service with your AWS login information.
Monitoring(String awsAccessId, String awsSecretKey, boolean isSecure)
          Initializes the ec2 service with your AWS login information.
Monitoring(String awsAccessId, String awsSecretKey, boolean isSecure, String server)
          Initializes the ec2 service with your AWS login information.
Monitoring(String awsAccessId, String awsSecretKey, boolean isSecure, String server, int port)
          Initializes the ec2 service with your AWS login information.
 
Method Summary
 MetricStatisticsResult getMetricStatistics(int period, List<Statistics> statistics, String namespace, Map<String,String> dimensions, Date startTime, Date endTime, String measureName, StandardUnit unit, String customUnit)
          Describe the AMIs that match the intersection of the criteria supplied
 List<Metric> listMetrics()
          List the valid metrics that have recorded data available.
protected
<T> T
makeRequestInt(org.apache.http.client.methods.HttpRequestBase method, String action, Map<String,String> params, Class<T> respType)
           
 
Methods inherited from class com.xerox.amazonws.common.AWSQueryConnection
close, close, getConnectionManagerTimeout, getConnectionTimeout, getHeaders, getHttpClient, getMaxConnections, getMaxRetries, getServerTimeZone, getSoTimeout, getString, httpDate, makeRequest, setConnectionManagerTimeout, setConnectionTimeout, setHttpClient, setMaxConnections, setMaxRetries, setProxyValues, setProxyValues, setProxyValues, setServerTimeZone, setSoTimeout, useSystemProxy
 
Methods inherited from class com.xerox.amazonws.common.AWSConnection
encode, encode, getAlgorithm, getAwsAccessKeyId, getPort, getResourcePrefix, getSecretAccessKey, getServer, getSignatureVersion, getUrl, isSecure, makeURL, setResourcePrefix, setServer, setSignatureVersion, urlencode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Monitoring

public Monitoring(String awsAccessId,
                  String awsSecretKey)
Initializes the ec2 service with your AWS login information.

Parameters:
awsAccessId - The your user key into AWS
awsSecretKey - The secret string used to generate signatures for authentication.

Monitoring

public Monitoring(String awsAccessId,
                  String awsSecretKey,
                  boolean isSecure)
Initializes the ec2 service with your AWS login information.

Parameters:
awsAccessId - The your user key into AWS
awsSecretKey - The secret string used to generate signatures for authentication.
isSecure - True if the data should be encrypted on the wire on the way to or from EC2.

Monitoring

public Monitoring(String awsAccessId,
                  String awsSecretKey,
                  boolean isSecure,
                  String server)
Initializes the ec2 service with your AWS login information.

Parameters:
awsAccessId - The your user key into AWS
awsSecretKey - The secret string used to generate signatures for authentication.
isSecure - True if the data should be encrypted on the wire on the way to or from EC2.
server - Which host to connect to. Usually, this will be monitoring.amazonaws.com

Monitoring

public Monitoring(String awsAccessId,
                  String awsSecretKey,
                  boolean isSecure,
                  String server,
                  int port)
Initializes the ec2 service with your AWS login information.

Parameters:
awsAccessId - The your user key into AWS
awsSecretKey - The secret string used to generate signatures for authentication.
isSecure - True if the data should be encrypted on the wire on the way to or from EC2.
server - Which host to connect to. Usually, this will be ec2.amazonaws.com
port - Which port to use.
Method Detail

getMetricStatistics

public MetricStatisticsResult getMetricStatistics(int period,
                                                  List<Statistics> statistics,
                                                  String namespace,
                                                  Map<String,String> dimensions,
                                                  Date startTime,
                                                  Date endTime,
                                                  String measureName,
                                                  StandardUnit unit,
                                                  String customUnit)
                                           throws MonitoringException
Describe the AMIs that match the intersection of the criteria supplied

Parameters:
period - granularity in seconds for the returned data points
namespace -
statistics -
dimensions - one or more dimension along which to aggregate the data
startTime - timestamp of the first datapoint
endTime - timestamp of the last datapoint
measureName - name of a measure for the gathered metric
unit - standard unit of measurement for a given measure
customUnit - user defined custom unit applied to a measure
Returns:
A list of Datapoint.
Throws:
MonitoringException - wraps checked exceptions

listMetrics

public List<Metric> listMetrics()
                         throws MonitoringException
List the valid metrics that have recorded data available.

Returns:
A list of Metric.
Throws:
MonitoringException - wraps checked exceptions

makeRequestInt

protected <T> T makeRequestInt(org.apache.http.client.methods.HttpRequestBase method,
                               String action,
                               Map<String,String> params,
                               Class<T> respType)
                    throws MonitoringException
Throws:
MonitoringException