Revision 477,
818 bytes
checked in by wojtekp, 13 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[477] | 1 | package schedframe.events.scheduling; |
---|
| 2 | |
---|
| 3 | import schedframe.events.Event; |
---|
| 4 | import schedframe.events.EventCommand; |
---|
| 5 | import schedframe.events.EventType; |
---|
| 6 | import schedframe.resources.computing.ComputingResource; |
---|
| 7 | |
---|
| 8 | public 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.