Package org.rioproject.system

Examples of org.rioproject.system.ResourceCapability


        public int compare(Object o1, Object o2) {
            if(!(o1 instanceof ServiceResource))
                throw new ClassCastException();
            if(!(o2 instanceof ServiceResource))
                throw new ClassCastException();
            ResourceCapability rc1 =
                ((InstantiatorResource)((ServiceResource)o1).
                                            getResource()).getResourceCapability();
            ResourceCapability rc2 = ((InstantiatorResource)((ServiceResource)o2).
                                            getResource()).getResourceCapability();
            return (rc1.compareTo(rc2));
        }
View Full Code Here


    private void notifyResourceCapabilityChangeListeners() {
        ResourceCapabilityChangeListener[] changeListeners;
        synchronized (listeners) {
            changeListeners = listeners.toArray(new ResourceCapabilityChangeListener[listeners.size()]);
        }
        ResourceCapability resourceCapability = getResourceCapability();
        for(ResourceCapabilityChangeListener l : changeListeners) {
            l.update(resourceCapability);
        }
    }
View Full Code Here

     * ComputeResource
     *
     * @return The ResourceCapability object for the ComputeResource
     */
    public ResourceCapability getResourceCapability() {
        return(new ResourceCapability(address.getHostAddress(),
                                      address.getHostName(),
                                      getPersistentProvisioning(),
                                      getPlatformCapabilities(),
                                      getComputeResourceUtilization()));
    }
View Full Code Here

                logger.trace("Already registered to {}", provisionManager);
                return;               
            }
            ProvisionManager provisioner = (ProvisionManager)provisionerPreparer.prepareProxy(provisionManager);
            logger.trace("ServiceConsumer - prepared ProvisionManager proxy: {}", provisioner.toString());
            ResourceCapability rCap = adapter.getResourceCapability();
            logger.trace("ResourceCapability {}", rCap);

            Lease lease = connect(provisioner);
            if(lease==null) {
                logger.warn("Unable to register to ProvisionManager {}", provisioner.toString());
View Full Code Here

                                                                                        sbi.inetAddress.getHostAddress(),
                                                                                        sbi.inetAddress.getHostName(),
                                                                                        measuredResources);
        SystemCapabilities systemCapabilities = new SystemCapabilities();
        PlatformCapability[] platformCapabilities = systemCapabilities.getPlatformCapabilities(new DynamicConfiguration());
        ResourceCapability resourceCapability = new ResourceCapability(sbi.inetAddress.getHostAddress(),
                                                                       sbi.inetAddress.getHostName(),
                                                                       true,
                                                                       platformCapabilities,
                                                                       resourceUtilization);
        instantiatorResource = new InstantiatorResource(null,
View Full Code Here

     * Get the ResourceCapability object
     *
     * @return The ResourceCapability of the ServiceBeanInstantiator
     */
    public ResourceCapability getResourceCapability() {
        ResourceCapability rCap;
        synchronized(resourceCapabilityLock) {
            rCap = resourceCapability;
        }
        return (rCap);
    }
View Full Code Here

TOP

Related Classes of org.rioproject.system.ResourceCapability

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.