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.qos
Class ComputeResourceObserver

    java.lang.Object
      org.jini.rio.qos.ComputeResourceObserver

All Implemented Interfaces:
  Observer

    public class ComputeResourceObserver

extends Object
implements Observer

The ComputeResourceObserver observes the ComputeResource object associated with a ServiceBean. It provides two functions: As the ComputeResource object changes, the ComputeResourceUtilization will be changed to reflect a change in the quantitative and/or qualitative QoS mechanisms reflected by the ComputeResource object As the ComputeResource object changes, it's overall utilization will be compared to the maximum utilization that may have been specified by the ServiceBean. If that cost exceeds the maximum utilization specified, then a SLAThresholdEvent will be fired

Constructor Summary
`ComputeResourceObserver(ComputeResource computeResource, ServiceBeanContext context, EventHandler eventHandler)` Construct a new ComputeResourceObserver

Method Summary
`void` | `disconnect()` Inform the ComputeResource object that this class is no longer interested in updates
`ComputeResourceUtilization` | `getComputeResourceUtilization()` Get a ComputeResourceUtilization using the observed ComputeResource
`void` | `setIgnore(boolean ignore)` Set the ignore property, telling the ComputeResourceObserver to ignore any changes from the ComputeResource
`void` | `setSource(Object source)` Set the event source
`void` | `update(Observable o, Object arg)` The ComputeResource has changed

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

Constructor Detail

### ComputeResourceObserver

    public ComputeResourceObserver(ComputeResource computeResource,
                                   ServiceBeanContext context,
                                   EventHandler eventHandler)

  Construct a new ComputeResourceObserver

  Parameters:
    `computeResource` - The ComputeResource to observe
    `context` - The ServiceBeanContext for the service bean
    `eventHandler` - The EventHandler for firing SLAThresholdEvents

Method Detail

### disconnect

    public void disconnect()

  Inform the ComputeResource object that this class is no longer interested in updates

### setSource

    public void setSource(Object source)

  Set the event source

  Parameters:
    `source` - The event source

### setIgnore

    public void setIgnore(boolean ignore)

  Set the ignore property, telling the ComputeResourceObserver to ignore any changes from the ComputeResource

  Parameters:
    `ignore` - If true, ignore changes to the ComputeResource

### getComputeResourceUtilization

    public ComputeResourceUtilization getComputeResourceUtilization()

  Get a ComputeResourceUtilization using the observed ComputeResource

  Returns:
    A ComputeResourceUtilization object representing the cost of the observed ComputeResource

### update

    public void update(Observable o,
                       Object arg)

  The ComputeResource has changed

  Specified by:
    `update` in interface `Observer`
  Parameters:
    `o` - The Observable object
    `arg` - The argument

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.