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

## org.jini.rio.watch
Class WatchDescriptor

    java.lang.Object
      org.jini.rio.watch.WatchDescriptor

All Implemented Interfaces:
  Serializable

    public class WatchDescriptor

extends Object
implements Serializable

The WatchDescriptor defines attributes of a declarable `Watch`, allowing a Watch to be declared as part of an OperationalString.

See Also:
  Serialized Form

Field Summary
`static String` | `COUNTER`
`static long` | `DEFAULT_PERIOD`
`static String` | `GAUGE`
`static String` | `STOP_WATCH`
`static String` | `UNDEFINED`

Constructor Summary
`WatchDescriptor(String name, String type, String property, long period)` Create a WatchDescriptor

Method Summary
`boolean` | `equals(Object o)`
`String` | `getName()` Get the name of the watch
`long` | `getPeriod()` Get the periodicity to collect data from the property
`String` | `getProperty()` Get the property name to invoke on the bean
`String` | `getType()` Get the Watch type
`int` | `hashCode()`
`boolean` | `isObjectName()` Determine if the proeprty name matches the naming conventions of a `javax.management.ObjectName`.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### GAUGE

    public static final String GAUGE

See Also:
  Constant Field Values

### COUNTER

    public static final String COUNTER

See Also:
  Constant Field Values

### STOP_WATCH

    public static final String STOP_WATCH

See Also:
  Constant Field Values

### UNDEFINED

    public static final String UNDEFINED

See Also:
  Constant Field Values

### DEFAULT_PERIOD

    public static final long DEFAULT_PERIOD

See Also:
  Constant Field Values

Constructor Detail

### WatchDescriptor

    public WatchDescriptor(String name,
                           String type,
                           String property,
                           long period)

  Create a WatchDescriptor

  Parameters:
    `name` - The name of the Watch
    `type` - The type of Watch. Must be `GAUGE`, `COUNTER`, or `STOP_WATCH`
    `property` - The bean property to invoke to obtain a value to record in the Watch.
    `period` - The period the Watch should use to collect data (in milliseconds). If the period is 0, the default period of 10 seconds will be used
  Throws:
    `IllegalArgumentException` - if the type is not `GAUGE`, `COUNTER`, or `STOP_WATCH`
    `NullPointerException` - if the name, type, or property arguments are null

Method Detail

### getName

    public String getName()

  Get the name of the watch

  Returns:
    The name of the Watch

### getType

    public String getType()

  Get the Watch type

  Returns:
    The type of Watch to create, will be either `GAUGE` , `COUNTER`, or `STOP_WATCH`

### getProperty

    public String getProperty()

  Get the property name to invoke on the bean

  Returns:
    The bean property name to invoke. may be null

### getPeriod

    public long getPeriod()

  Get the periodicity to collect data from the property

  Returns:
    The periodicity to collect data from the property, default is 10 seconds

### isObjectName

    public boolean isObjectName()

  Determine if the proeprty name matches the naming conventions of a `javax.management.ObjectName`. If the proeprty name contains a ":", the property name iwll be determined to match the object name pattern

  Returns:
    If the property matches object name pattern return true, otherwise false

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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

Copyright © Project Rio.