package schedframe.resources.computing; import java.util.List; import schedframe.resources.StandardResourceType; import schedframe.resources.computing.description.ComputingResourceDescription; import schedframe.resources.computing.profiles.energy.EnergyExtension; import schedframe.resources.computing.profiles.energy.power.PowerInterfaceFactory; import schedframe.resources.computing.profiles.energy.power.ui.PowerInterface; public class DataCenter extends ComputingResource{ public DataCenter(ComputingResourceDescription resDesc) { super(resDesc); //extensionList.add(new EnergyExtension(this, resDesc.getPowerInterface(), resDesc.getEnergyEstimationPlugin())); PowerInterface pi = PowerInterfaceFactory.createPowerInterface(this, resDesc.getPowerProfile()); accept(new EnergyExtension(pi, resDesc.getPowerProfile())); } public void accept(EnergyExtension e){ extensionList.add(e); e.setResource(this); } @SuppressWarnings("unchecked") public List getComputingNodes(){ return (List) getDescendantsByType(StandardResourceType.ComputingNode); } }