package test.rewolucja.scheduling; import gridsim.gssim.GssimConstants; import schedframe.scheduling.plugin.estimation.ExecTimeEstimationPlugin; import test.rewolucja.resources.ResourceType; import test.rewolucja.resources.description.ExecResourceDescription; import test.rewolucja.scheduling.implementation.GridBroker; import test.rewolucja.scheduling.implementation.LocalManagementSystem; import test.rewolucja.scheduling.implementation.ManagementSystem; public class ManagementSystemFactory { public static ManagementSystem createManagementSystem(ExecResourceDescription erd, ResourceType type,String schedulingPluginName, ExecTimeEstimationPlugin execTimeEstimationPlugin) throws Exception{ switch(type){ case COMPUTING_GRID: return new GridBroker(erd.getResourceId(), schedulingPluginName, execTimeEstimationPlugin, erd); case COMPUTING_NODE: return new LocalManagementSystem(erd.getResourceId(), GssimConstants.MANAGEMENT_SYSTEM, schedulingPluginName, execTimeEstimationPlugin, erd); default: return null; } } }