/** * Notification from the ComputeResource of a change in the ResourceCapability object. Get the * updated ResourceCapability and notify all provisioners */ public void update(Observable o, Object arg) { if (!(o instanceof ComputeResource)) { logger.log(Level.WARNING, "Observable update is not a ComputeResource, detach"); computeResource.deleteObserver(this); return; } if (!destroyed) { updateMonitors((ResourceCapability) arg, getServiceDeployments()); } else { logger.warning("Destroyed, but still getting updates from " + "ComputeResource"); } }
ComputeResourceObserver(ComputeResource computeResource) { this.computeResource = computeResource; computeResource.addObserver(this); }