Index: /DCWoRMS/branches/coolemall/src/test/EventManager.java
===================================================================
--- /DCWoRMS/branches/coolemall/src/test/EventManager.java	(revision 1398)
+++ /DCWoRMS/branches/coolemall/src/test/EventManager.java	(revision 1421)
@@ -14,5 +14,4 @@
 import schedframe.Initializable;
 import schedframe.SimulatedEnvironment;
-import schedframe.events.Event;
 import schedframe.events.ResourceEventCommand;
 import schedframe.exceptions.ModuleException;
@@ -20,4 +19,5 @@
 import schedframe.resources.ResourceType;
 import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
 import schedframe.scheduling.Scheduler;
 import schedframe.scheduling.plugin.Module;
@@ -63,5 +63,5 @@
 		switch (ev.get_tag()) {
 
-		case DCWormsTags.TO_COMP_RESOURCES:
+		case DCWormsTags.TO_RESOURCES:
 			sendToResources(ev);
 			break;
@@ -110,5 +110,4 @@
 		}
 		
-		
 		for(Scheduler scheduler: allSchedulers){
 			//sendInternal(delay, DCWormsTags.TO_SCHEDULERS, scheduler.get_id());
@@ -117,17 +116,17 @@
 	}
 	
-	public void sendToResources(ResourceType type, double delay, Event event){
-		List<ComputingResource> allComputingResources = new ArrayList<ComputingResource>();
+	public void sendToResources(ResourceType type, double delay, ResourceEvent event){
+		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
 
 		if (simEnv.getComputingResources() != null) {
 			for(ComputingResource compRes: simEnv.getComputingResources()){
-				allComputingResources.addAll(compRes.getDescendantsByType(type));
-			}
-		}
-		sendInternal(delay, DCWormsTags.TO_COMP_RESOURCES, new ResourceBroadcastOrder(allComputingResources, event));
-	}
-	
-	public void sendToAllResources(double delay, Event event){
-		List<ComputingResource> allComputingResources = new ArrayList<ComputingResource>();
+				computingResources.addAll(compRes.getDescendantsByType(type));
+			}
+		}
+		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
+	}
+	
+	public void sendToAllResources(double delay, ResourceEvent event){
+		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
 
 		if (simEnv.getComputingResources() != null) {
@@ -135,5 +134,5 @@
 			for(ComputingResource compRes: simEnv.getComputingResources()){
 				toExamine.push(compRes);
-				allComputingResources.add(compRes);
+				computingResources.add(compRes);
 			}
 
@@ -145,20 +144,20 @@
 					ComputingResource resourceChild = resources.get(i);
 					toExamine.addLast(resourceChild);
-					allComputingResources.add(resourceChild);
+					computingResources.add(resourceChild);
 				}
 			}
 		}
-		sendInternal(delay, DCWormsTags.TO_COMP_RESOURCES, new ResourceBroadcastOrder(allComputingResources, event));
-	}
-
-	public void sendToResource(String resourceName, double delay, Event event){
-		List<ComputingResource> allComputingResources = new ArrayList<ComputingResource>();
+		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
+	}
+
+	public void sendToResource(String resourceName, double delay, ResourceEvent event){
+		List<ComputingResource> computingResources = new ArrayList<ComputingResource>();
 
 		try {
-			allComputingResources.add(SimulatedEnvironment.getComputingResourceByName(resourceName));
+			computingResources.add(SimulatedEnvironment.getComputingResourceByName(resourceName));
 		} catch (ResourceException e) {
 
 		}
-		sendInternal(delay, DCWormsTags.TO_COMP_RESOURCES, new ResourceBroadcastOrder(allComputingResources, event));
+		sendInternal(delay, DCWormsTags.TO_RESOURCES, new ResourceBroadcastOrder(computingResources, event));
 	}
 	
@@ -167,7 +166,7 @@
 		
 		ResourceBroadcastOrder rbo = (ResourceBroadcastOrder)ev.get_data();
-		List<ComputingResource> allComputingResources = rbo.getComputingResources();
-		Event event = rbo.getEvent();
-		for(ComputingResource compRes: allComputingResources){
+		List<ComputingResource> computingResources = rbo.getComputingResources();
+		ResourceEvent event = rbo.getEvent();
+		for(ComputingResource compRes: computingResources){
 			rec = new ResourceEventCommand(compRes);
 			rec.execute(event);
@@ -194,7 +193,7 @@
 
 	private List<ComputingResource> computingResources;
-	private Event event;
-	
-	public ResourceBroadcastOrder(List<ComputingResource> computingResources, Event event) {
+	private ResourceEvent event;
+	
+	public ResourceBroadcastOrder(List<ComputingResource> computingResources, ResourceEvent event) {
 		super();
 		this.computingResources = computingResources;
@@ -206,5 +205,5 @@
 	}
 
-	public Event getEvent() {
+	public ResourceEvent getEvent() {
 		return event;
 	}
