source: DCWoRMS/trunk/src/schedframe/events/scheduling/SchedulingEventCommand.java @ 477

Revision 477, 818 bytes checked in by wojtekp, 13 years ago (diff)
  • Property svn:mime-type set to text/plain
Line 
1package schedframe.events.scheduling;
2
3import schedframe.events.Event;
4import schedframe.events.EventCommand;
5import schedframe.events.EventType;
6import schedframe.resources.computing.ComputingResource;
7
8public class SchedulingEventCommand implements EventCommand {
9
10        private ComputingResource compResource;
11       
12        public SchedulingEventCommand (ComputingResource compResource) {
13                this.compResource = compResource;
14        }
15       
16        public void execute(EventType evType) {
17                SchedulingEvent ev = new SchedulingEvent(evType);
18                ev.setSource(compResource.getName());
19                compResource.getEventHandler().handleSchedulingEvent(ev);
20        }
21       
22        public void execute(Event event) {
23                SchedulingEvent ev = new SchedulingEvent(event.getType());
24                ev.setSource(compResource.getName());
25                compResource.getEventHandler().handleSchedulingEvent(ev);
26        }
27
28}
Note: See TracBrowser for help on using the repository browser.