package simulator.workload.generator; import gridsim.ResourceCalendar; import java.io.FileNotFoundException; import java.io.IOException; import milus.MiloGridResource; import simulator.workload.exceptons.XMLLogicException; /** * Interface of a resource configuration reader. * @author Stanislaw Szczepanowski * */ public interface ResourceGeneratorInterface { /** * This method creates resources on the basis of xml resources descriptions schema (ResourceDescSchema.xsd). * It is used when new resources are to be created with a given statistical values (e.g. all resources should have * total memory variable size with distribution N(0, 1) ). * * @param fileName the pathname of the xml file (proper with ResourceDescSchema.xsd) * @throws FileNotFoundException * @throws XMLLogicException * @throws IllegalAccessException */ public void readConfigurationXMLFile(String fileName) throws FileNotFoundException, XMLLogicException, IllegalAccessException; /** * Reads the description of resources according to HostParamSchema.xsd * * @param fileName the pathname of the xml file * @throws FileNotFoundException */ public void readConfigurationHostsDescriptionXMLFile(String fileName) throws FileNotFoundException; /** * Reads plugins configuration from text file. * @param fileName * @return * @throws IOException */ public boolean loadPlugins(String fileName) throws IOException; /** * Invoking this metohod will create resources. Important: this method must be invoked after the initialisation of the GridSim ({@link gridsim.GridSim} init methods). * @throws Exception */ public void createResources(ResourceCalendar calendar) throws Exception; /** * Prints out the statistical data into the out printer * @param out the {@link PrintWriter} object to write data into */ //public void printResourcesStatistics(PrintWriter out); //FIXME /** * Retrieves the created resources. * @return array with the created resources */ public MiloGridResource[] getCreatedResources(); }