package schedframe.events.scheduling; import schedframe.events.EventCommand; import schedframe.resources.computing.ComputingResource; import schedframe.resources.computing.profiles.energy.ResourceEvent; public class SchedulingEventCommand implements EventCommand { private ComputingResource compResource; public SchedulingEventCommand (ComputingResource compResource) { this.compResource = compResource; } public void execute(ResourceEvent event) { SchedulingEvent ev = new ResourceStateChangedEvent(event.getType()); ev.setSource(compResource.getFullName()); compResource.getEventHandler().handleSchedulingEvent(ev); } }