Revision 1415,
643 bytes
checked in by wojtekp, 11 years ago
(diff) |
|
-
Property svn:mime-type set to
text/plain
|
Rev | Line | |
---|
[477] | 1 | package schedframe.events.scheduling; |
---|
| 2 | |
---|
| 3 | import schedframe.events.EventCommand; |
---|
| 4 | import schedframe.resources.computing.ComputingResource; |
---|
[1415] | 5 | import schedframe.resources.computing.profiles.energy.ResourceEvent; |
---|
[477] | 6 | |
---|
| 7 | public class SchedulingEventCommand implements EventCommand { |
---|
| 8 | |
---|
| 9 | private ComputingResource compResource; |
---|
| 10 | |
---|
| 11 | public SchedulingEventCommand (ComputingResource compResource) { |
---|
| 12 | this.compResource = compResource; |
---|
| 13 | } |
---|
| 14 | |
---|
[1415] | 15 | public void execute(ResourceEvent event) { |
---|
| 16 | SchedulingEvent ev = new ResourceStateChangedEvent(event.getType()); |
---|
[1207] | 17 | ev.setSource(compResource.getFullName()); |
---|
[477] | 18 | compResource.getEventHandler().handleSchedulingEvent(ev); |
---|
| 19 | } |
---|
| 20 | |
---|
| 21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.