Rio Project 4.2 API Documentation



org.rioproject.system
Class ComputeResourceObserver

java.lang.Object
  extended by org.rioproject.system.ComputeResourceObserver
All Implemented Interfaces:
Observer

public class ComputeResourceObserver
extends Object
implements Observer

The ComputeResourceObserver observes the ComputeResource object associated with a ServiceBean. It provides the following function:

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

Author:
Dennis Reedy

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
 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

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

Copyright © Rio Project.

Copyright © 2006-2011 Rio Project. All Rights Reserved.