Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 java.lang.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
`java.lang.String` | `getDuration()`
`java.lang.String` | `getGroup()`
`long` | `getInterval()`
`java.lang.String` | `getIntervalString()`
`java.util.Date` | `getLastUpdated()`
`QName` | `getName()`
`java.util.Date` | `getResetAt()`
`WsResource` | `getWsResource()`
`boolean` | `hasBeenReset()`
`boolean` | `isCounter()`
`boolean` | `isGauge()`
`boolean` | `isInterval()`
`boolean` | `isOnChange()`
`boolean` | `isOnDemand()`
`boolean` | `isPeriodic()`
`boolean` | `isPointInTime()`
`boolean` | `isSinceReset()`
`void` | `reset(java.lang.Object value)` Updates the resource property via WSRP and then adjusts the metric metadata to reflect the change.
`void` | `update()` Notifies the metric metadata container that an update to the resource property occurred, so it should adjust the metadata values to reflect this change.

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 java.lang.String getDuration()

  Specified by:
    `getDuration` in interface `Metric`

### getGroup

    public java.lang.String getGroup()

  Specified by:
    `getGroup` in interface `Metric`

### getInterval

    public long getInterval()

  Specified by:
    `getInterval` in interface `Metric`

### getIntervalString

    public java.lang.String getIntervalString()

  Specified by:
    `getIntervalString` in interface `Metric`

### getLastUpdated

    public java.util.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 java.util.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(java.lang.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`

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD