package schedframe.events.scheduling; import schedframe.events.Event; import schedframe.events.EventCommand; import schedframe.events.EventType; import schedframe.resources.computing.ComputingResource; public class SchedulingEventCommand implements EventCommand { private ComputingResource compResource; public SchedulingEventCommand (ComputingResource compResource) { this.compResource = compResource; } public void execute(EventType evType) { SchedulingEvent ev = new SchedulingEvent(evType); ev.setSource(compResource.getName()); compResource.getEventHandler().handleSchedulingEvent(ev); } public void execute(Event event) { SchedulingEvent ev = new SchedulingEvent(event.getType()); ev.setSource(compResource.getName()); compResource.getEventHandler().handleSchedulingEvent(ev); } }