Vordel SDK

com.vordel.reporting.rtm.api
Class MetricGroupType

java.lang.Object
  extended by com.vordel.reporting.rtm.api.MetricGroupType

public class MetricGroupType
extends java.lang.Object

This class holds the type information for a MetricGroup object. Each MetricGroupType must be registered with the MetricGroupTypeRegistry. MetricGroupTypes may be defined within the Gateway's configuration store, these MetricGroupTypes will be automatically registered. For example, some of the MetricGroupTypes defined by default are:- Service, Client, TargetServer, SystemOverview. Please refer to the Vordel documentation for a complete list of MetricGroupTypes defined in the Gateway's configuration store. It is possible via the Metrics API, to create a MetricGroup whose associated MetricGroupType is not defined in the Gateway's configuration store. Please refer to the MetricGroup Javadoc for more information.

The MetricGroupType defines the list of metrics that may be generated for a MetricGroup. A map of MetricType objects in the MetricGroupType object defines this list of metrics.

A MetricGroupType may have n child MetricGroupTypes. For example, the Service MetricGroupType has a child MetricGroupType for each client. In this way it is possible to generate metrics that are for a service and client combination, e.g. how may times did client John Smith invoke the service StockQuote.

See Also:
MetricGroup, MetricType

Constructor Summary
MetricGroupType(java.lang.String name)
          Construct a MetricGroupType.
MetricGroupType(java.lang.String name, java.util.List<MetricType> metricTypes)
          Construct a MetricGroupType.
MetricGroupType(java.lang.String name, java.lang.String[] metricNames)
          Construct a MetricGroupType with a set of named MetricTypeValue metric types.
 
Method Summary
 void addMetricType(MetricType type)
          Add a MetricType to the MetricGroupType.
 java.util.List<java.lang.String> getMetricNames()
          Get the names of the metrics that will be generated for the MetricGroupType.
 MetricType getMetricType(java.lang.String name)
          Gets a MetricType by name.
 java.util.Map<java.lang.String,MetricType> getMetricTypes()
          Get the allowed metrics that are defined for this type of MetricGroupType.
 java.lang.String getName()
          Get the name of the MetricGroupType.
 boolean hasMetricType(java.lang.String name)
          Checks to see if this MetricGroupType has the named MetricType in its list of generated metrics.
 void setChildMetricGroupTypes(java.util.List<MetricGroupType> childMetricGroupTypes)
          Set the child MetricGroupTypes.
 void setMetricTypes(java.util.Map<java.lang.String,MetricType> types)
          Set the allowed metrics that are defined for this type of MetricGroupType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MetricGroupType

public MetricGroupType(java.lang.String name)
Construct a MetricGroupType.

Parameters:
name - The name of the MetricGroupType, e.g. Service.

MetricGroupType

public MetricGroupType(java.lang.String name,
                       java.util.List<MetricType> metricTypes)
Construct a MetricGroupType.

Parameters:
name - The name of the MetricGroupType, e.g. Service.
metricTypes - The metrics that can be generated for this MetricGroupType.

MetricGroupType

public MetricGroupType(java.lang.String name,
                       java.lang.String[] metricNames)
Construct a MetricGroupType with a set of named MetricTypeValue metric types.

Parameters:
name - The name of the MetricGroupType, e.g. Service.
metricNames - The names of the MetricTypeValue metrics that can be generated for this MetricGroupType. These metrics will have no minimum, maximum, or average values generated. The values will be reset at the start of each time window.
Method Detail

getName

public java.lang.String getName()
Get the name of the MetricGroupType.

Returns:
The name

addMetricType

public void addMetricType(MetricType type)
Add a MetricType to the MetricGroupType. This must be done before the MetricGroupType is registered.

Parameters:
type - The metric type
Throws:
java.lang.IllegalArgumentException - If you add a MetricType whose generated metric names exists already in another MetricType.

getMetricTypes

public java.util.Map<java.lang.String,MetricType> getMetricTypes()
Get the allowed metrics that are defined for this type of MetricGroupType.

Returns:
A copy of the Map of metrics where the keys are the metric names

hasMetricType

public boolean hasMetricType(java.lang.String name)
Checks to see if this MetricGroupType has the named MetricType in its list of generated metrics.

Parameters:
name - The name of the metric to check
Returns:
true if the MetricGroupType can generate the metric

getMetricType

public MetricType getMetricType(java.lang.String name)
Gets a MetricType by name.

Parameters:
name - The name of the metric.
Returns:
The metric type.

setMetricTypes

public void setMetricTypes(java.util.Map<java.lang.String,MetricType> types)
Set the allowed metrics that are defined for this type of MetricGroupType. This must be done before the MetricGroupType is registered.

Parameters:
types - Map of metrics where the key is the metric name

setChildMetricGroupTypes

public void setChildMetricGroupTypes(java.util.List<MetricGroupType> childMetricGroupTypes)
Set the child MetricGroupTypes. This must be done before the MetricGroupType is registered.

Parameters:
childMetricGroupTypes - The child MetricGroupTypes.

getMetricNames

public java.util.List<java.lang.String> getMetricNames()
Get the names of the metrics that will be generated for the MetricGroupType. If the metric has a minimum, maximum, or average metric those names will be added to the list of metric names. If the metric is a MetricTypeRangeCount, the names are those of the individual ranges not the top-level metric, i.e. respTimeRange1, respTimeRange2 etc, not respTimeRange.

Returns:
The metric names

Vordel SDK


This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel