/*
 * Copyright 2008 the original author or authors.
 * Copyright 2005 Sun Microsystems, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.rioproject.core.jsb;

import org.rioproject.system.capability.PlatformCapability;
import org.rioproject.system.measurable.MeasurableCapability;
import org.rioproject.system.ComputeResource;

/**
 * The ComputeResourceManager provides the capabilities to access, set and
 * obtain information on {@link ComputeResource} mechanisms
 *
 * @author Dennis Reedy
 */
public interface ComputeResourceManager {
    /**
     * Get the ComputeResource object
     * 
     * @return The Object representing the platform
     * and measurable capabilities of the compute resource upon which the
     * service has been instantiated
     */
    ComputeResource getComputeResource();

    /**
     * Get a PlatformCapability instance from a name
     * 
     * @param description The name of the PlatformCapability
     * @return The first PlatformCapability that matches
     * the name. If no PlatformCapability matches the name, return
     * null
     */
    PlatformCapability getPlatformCapability(String description);

    /**
     * Get the PlatformCapability instances that match declared system
     * requirements
     * 
     * @return  An array of PlatformCapability instances
     * that match declared operational requirements. If there are no declared
     * PlatformCapability requirements, then return a zero-length array
     */
    PlatformCapability[] getMatchedPlatformCapabilities();

    /**
     * Get the MeasurableCapability instances that match declared SLAs.
     * 
     * @return 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
     */
    MeasurableCapability[] getMatchedMeasurableCapabilities();
}

@@ -931,19 +931,16 @@
  set and
-%0A *
  obtain 
@@ -953,16 +953,23 @@
 ation on
+%0A * the
  %7B@link 
@@ -988,19 +988,9 @@
 rce%7D
- mechanisms
+.
 %0A *%0A
@@ -1136,151 +1136,52 @@
 The 
-Object representing the platform%0A     * and measurable capabilities of the c
+%7B@code C
 ompute
- r
+R
 esource
- upon which the%0A     * service has been instantiated
+%7D, never %7B@code null%7D.
 %0A   
@@ -1288,16 +1288,17 @@
 m a name
+.
 %0A     * 
@@ -1355,24 +1355,31 @@
 mCapability%0A
+     *%0A
      * @retu
@@ -1422,23 +1422,16 @@
  matches
-%0A     *
  the nam
@@ -1457,16 +1457,23 @@
 pability
+%0A     *
  matches
@@ -1493,20 +1493,113 @@
 turn
-%0A     *
+ %7B@code null%7D.%0A     *%0A     * @throws IllegalArgumentException if the %7B@code description%7D is %7B@code
  null
+%7D.
 %0A   
@@ -1748,23 +1748,16 @@
 d system
-%0A     *
  require
@@ -1761,16 +1761,17 @@
 irements
+.
 %0A     * 
@@ -1827,23 +1827,16 @@
 nstances
-%0A     *
  that ma
@@ -1851,32 +1851,39 @@
 ared operational
+%0A     *
  requirements. I
@@ -1905,23 +1905,16 @@
 declared
-%0A     *
  Platfor
@@ -1950,16 +1950,23 @@
 n return
+%0A     *
  a zero-
@@ -1969,32 +1969,33 @@
 ero-length array
+.
 %0A     */%0A    Pla
@@ -2182,23 +2182,16 @@
 pability
-%0A     *
  instanc
@@ -2230,32 +2230,39 @@
 al requirements.
+%0A     *
  If there are no
@@ -2261,23 +2261,16 @@
 e are no
-%0A     *
  declare
@@ -2335,17 +2335,16 @@
 return a
- 
 %0A     * 

Clean up docs.