Rio Project 4.2 API Documentation



org.rioproject.core.jsb
Interface ComputeResourceManager

All Known Implementing Classes:
JSBContext

public interface ComputeResourceManager

The ComputeResourceManager provides the capabilities to access, set and obtain information on ComputeResource mechanisms

Author:
Dennis Reedy

Method Summary
 PlatformCapability addPlatformCapability(String className, URL location, Map<String,Object> mapping)
          Add a PlatformCapability.
 ComputeResource getComputeResource()
          Get the ComputeResource object
 MeasurableCapability[] getMatchedMeasurableCapabilities()
          Get the MeasurableCapability instances that match declared SLAs.
 PlatformCapability[] getMatchedPlatformCapabilities()
          Get the PlatformCapability instances that match declared system requirements
 PlatformCapability getPlatformCapability(String description)
          Get a PlatformCapability instance from a name
 boolean removePlatformCapability(PlatformCapability pCap)
          Remove a PlatformCapability that was added by the ServiceBean.
 

Method Detail

getComputeResource

ComputeResource getComputeResource()
Get the ComputeResource object

Returns:
The Object representing the platform and measurable capabilities of the compute resource upon which the service has been instantiated

getPlatformCapability

PlatformCapability getPlatformCapability(String description)
Get a PlatformCapability instance from a name

Parameters:
description - The name of the PlatformCapability
Returns:
The first PlatformCapability that matches the name. If no PlatformCapability matches the name, return null

getMatchedPlatformCapabilities

PlatformCapability[] getMatchedPlatformCapabilities()
Get the PlatformCapability instances that match declared system requirements

Returns:
An array of PlatformCapability instances that match declared operational requirements. If there are no declared PlatformCapability requirements, then return a zero-length array

addPlatformCapability

PlatformCapability addPlatformCapability(String className,
                                         URL location,
                                         Map<String,Object> mapping)
Add a PlatformCapability. A PlatformCapability will be added to the ComputeResource object for the duration of the ServiceBean's lifetime

Parameters:
className - The class name of the PlatformCapability. This name must be suitable for Class.forName use
location - An URL indicating where to load the PlatformCapability from. If this parmater is null, the PlatformCapability will be loaded from platform-capabilities.jar
mapping - The Map of name,value pairs the PlatformCapability will set
Returns:
The added PlatformCapability, or null if the PlatformCapability could not be created or added

removePlatformCapability

boolean removePlatformCapability(PlatformCapability pCap)
Remove a PlatformCapability that was added by the ServiceBean. Only PlatformCapability instances that were added by the ServiceBean may be removed using this method

Parameters:
pCap - The PlatformCapability to remove
Returns:
True if removed

getMatchedMeasurableCapabilities

MeasurableCapability[] getMatchedMeasurableCapabilities()
Get the MeasurableCapability instances that match declared SLAs.

Returns:
An array of MeasurableCapability instances that match declared operational requirements. If there are no declared SLAs which match MeasurableCapability identifiers, then return a zero-length array

Copyright © Rio Project.

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