org.apache.muse.ws.dm.muws.impl
Class SimpleMetric
java.lang.Object
org.apache.muse.ws.dm.muws.impl.SimpleMetric
- All Implemented Interfaces:
- Metric
public class SimpleMetric
- extends Object
- implements Metric
SimpleMetric is a collection of metadata that is associated with resource
properties that are also metrics. This information should be provided
by a property's RMD definition, and can be used by a resource implementation
to set up the collection and retrieval of a metric. The only way that this
class can be used to modify a metric property is through the reset(Object)
method - all other methods manipulate the metric's metadata, but not its
actual value.
- Author:
- Dan Jemiolo (danj)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleMetric
public SimpleMetric(QName name,
WsResource resource)
- Parameters:
name
- The name of the metric property.resource
- The WS-resource that defines this metric.
getDuration
public String getDuration()
- Specified by:
getDuration
in interface Metric
getGroup
public String getGroup()
- Specified by:
getGroup
in interface Metric
getInterval
public long getInterval()
- Specified by:
getInterval
in interface Metric
getIntervalString
public String getIntervalString()
- Specified by:
getIntervalString
in interface Metric
getLastUpdated
public Date getLastUpdated()
- Specified by:
getLastUpdated
in interface Metric
getName
public QName getName()
- Specified by:
getName
in interface Metric
- Returns:
- The name of the resource property that this metric represents.
getResetAt
public Date getResetAt()
- Specified by:
getResetAt
in interface Metric
getWsResource
public WsResource getWsResource()
- Specified by:
getWsResource
in interface Metric
- Returns:
- The resource instance that contains the resource property that
this metric represents.
hasBeenReset
public boolean hasBeenReset()
- Specified by:
hasBeenReset
in interface Metric
- Returns:
- True if no calls to update() have been made since the last
call to reset().
isCounter
public boolean isCounter()
- Specified by:
isCounter
in interface Metric
isGauge
public boolean isGauge()
- Specified by:
isGauge
in interface Metric
isInterval
public boolean isInterval()
- Specified by:
isInterval
in interface Metric
isOnChange
public boolean isOnChange()
- Specified by:
isOnChange
in interface Metric
isOnDemand
public boolean isOnDemand()
- Specified by:
isOnDemand
in interface Metric
isPeriodic
public boolean isPeriodic()
- Specified by:
isPeriodic
in interface Metric
isPointInTime
public boolean isPointInTime()
- Specified by:
isPointInTime
in interface Metric
isSinceReset
public boolean isSinceReset()
- Specified by:
isSinceReset
in interface Metric
reset
public void reset(Object value)
throws BaseFault
- Description copied from interface:
Metric
- Updates the resource property via WSRP and then adjusts the metric
metadata to reflect the change.
- Specified by:
reset
in interface Metric
- Parameters:
value
- The value to be provided to the WSRP implementation when updating
the resource property.
- Throws:
BaseFault
update
public void update()
- Description copied from interface:
Metric
- Notifies the metric metadata container that an update to the resource
property occurred, so it should adjust the metadata values to reflect
this change.
- Specified by:
update
in interface Metric
Copyright © 2005-2011 Apache Web Services - Muse. All Rights Reserved.