org.apache.muse.ws.dm.muws.impl
Class SimpleMetric

java.lang.Object
  extended by 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)

Field Summary
 
Fields inherited from interface org.apache.muse.ws.dm.muws.Metric
COUNTER, GAUGE, INTERVAL, ON_CHANGE, ON_DEMAND, PERIODIC, POINT_IN_TIME, SINCE_RESET, UNKNOWN
 
Constructor Summary
SimpleMetric(QName name, WsResource resource)
           
 
Method Summary
 String getDuration()
           
 String getGroup()
           
 long getInterval()
           
 String getIntervalString()
           
 Date getLastUpdated()
           
 QName getName()
           
 Date getResetAt()
           
 WsResource getWsResource()
           
 boolean hasBeenReset()
           
 boolean isCounter()
           
 boolean isGauge()
           
 boolean isInterval()
           
 boolean isOnChange()
           
 boolean isOnDemand()
           
 boolean isPeriodic()
           
 boolean isPointInTime()
           
 boolean isSinceReset()
           
 void reset(Object value)
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleMetric

public SimpleMetric(QName name,
                    WsResource resource)
Parameters:
name - The name of the metric property.
resource - The WS-resource that defines this metric.
Method Detail

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

getResetAt

public Date getResetAt()
Specified by:
getResetAt in interface Metric

getWsResource

public WsResource getWsResource()
Specified by:
getWsResource in interface Metric

hasBeenReset

public boolean hasBeenReset()
Specified by:
hasBeenReset in interface Metric

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
Specified by:
reset in interface Metric
Throws:
BaseFault

update

public void update()
Specified by:
update in interface Metric


Copyright © 2013 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.