Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/ResourceStateChangedEvent.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/ResourceStateChangedEvent.java	(revision 1316)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/ResourceStateChangedEvent.java	(revision 1415)
@@ -1,22 +1,17 @@
 package schedframe.events.scheduling;
 
-import schedframe.events.EventType;
+import schedframe.resources.computing.profiles.energy.ResourceEventType;
 
-public class ResourceStateChangedEvent  extends SchedulingEvent {
+public class ResourceStateChangedEvent extends SchedulingEvent {
 
-	protected String resourceName;
-	protected EventType eventType;
+	protected ResourceEventType eventType;
 	
-	public ResourceStateChangedEvent(String resourceName, EventType eventType) {
+	public ResourceStateChangedEvent(ResourceEventType eventType) {
 		super(SchedulingEventType.RESOURCE_STATE_CHANGED);
-		this.resourceName = resourceName;
 		this.eventType = eventType;
 	}
 
-	public String getResourceName() {
-		return resourceName;
-	}
 
-	public EventType getEventType() {
+	public ResourceEventType getResourceEventType() {
 		return eventType;
 	}
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventCommand.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventCommand.java	(revision 1316)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventCommand.java	(revision 1415)
@@ -1,7 +1,7 @@
 package schedframe.events.scheduling;
 
-import schedframe.events.Event;
 import schedframe.events.EventCommand;
 import schedframe.resources.computing.ComputingResource;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
 
 public class SchedulingEventCommand implements EventCommand {
@@ -13,6 +13,6 @@
 	}
 	
-	public void execute(Event event) {
-		SchedulingEvent ev = new ResourceStateChangedEvent(compResource.getFullName(), event.getType());
+	public void execute(ResourceEvent event) {
+		SchedulingEvent ev = new ResourceStateChangedEvent(event.getType());
 		ev.setSource(compResource.getFullName());
 		compResource.getEventHandler().handleSchedulingEvent(ev);
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskPausedEvent.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskPausedEvent.java	(revision 1415)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskPausedEvent.java	(revision 1415)
@@ -0,0 +1,22 @@
+package schedframe.events.scheduling;
+
+public class TaskPausedEvent extends SchedulingEvent {
+
+	protected String jobId;
+	protected String taskId;
+	
+	public TaskPausedEvent(String jobId, String taskId) {
+		super(SchedulingEventType.TASK_PAUSED);
+		this.jobId = jobId;
+		this.taskId = taskId;
+	}
+
+	public String getJobId() {
+		return jobId;
+	}
+
+	public String getTaskId() {
+		return taskId;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEvent.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEvent.java	(revision 1316)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEvent.java	(revision 1415)
@@ -2,4 +2,5 @@
 
 import schedframe.events.Event;
+import schedframe.events.EventReason;
 import schedframe.events.EventType;
 
@@ -25,5 +26,5 @@
 			schedEventType = (SchedulingEventType)type;
 		} catch(Exception e){
-			schedEventType = SchedulingEventType.RESOURCE_STATE_CHANGED;
+			schedEventType = null;
 		}
 		return schedEventType;
@@ -42,8 +43,4 @@
 	}
 
-	public int getTag() {
-		return type.getTag();
-	}
-
 	public Object getData() {
 		return null;
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventType.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventType.java	(revision 1360)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingEventType.java	(revision 1415)
@@ -6,48 +6,33 @@
 
 	// task related
-	TASK_FINISHED(1),
-	TASK_FAILED(2),
-	TASK_CANCELED(4),
-	TASK_ARRIVED(8),
-	TASK_PAUSED(16),
-	TASK_RESUMED(32),
-	TASK_MOVED(64),
-	START_TASK_EXECUTION(128),
-	TASK_REQUESTED_TIME_EXPIRED(256),
+	TASK_FINISHED,
+	TASK_FAILED,
+	TASK_CANCELED,
+	TASK_ARRIVED,
+	TASK_PAUSED,
+	TASK_RESUMED,
+	TASK_MOVED,
+	TASK_EXECUTION_CHANGED,
+	START_TASK_EXECUTION,
+	TASK_REQUESTED_TIME_EXPIRED,
 
 	//job related
-	JOB_ARRIVED(512),
-	JOB_FINISHED(1024),
-	JOB_FAILED(2048),
-	JOB_CANCELED(4096),
+	JOB_ARRIVED,
+	JOB_FINISHED,
+	JOB_FAILED,
+	JOB_CANCELED,
 
 	//time related
-	TIMER(8192),
+	TIMER,
+		
+	//resource related
+	RESOURCE_FAILED,
+	//provider related (relevant to grid scheduling)
+	PROVIDER_FAILED,
+
+	RESOURCE_STATE_CHANGED,
 	
-	//reservation related
-	RESERVATION_ACTIVE(16384),
-	RESERVATION_FINISHED(32768),
-	RESERVATION_FAILED(65536),
-	RESERVATION_EXPIRED(131072),
-	
-	//resource related
-	RESOURCE_FAILED(262144),
-	//provider related (relevant to grid scheduling)
-	PROVIDER_FAILED(524288),
+	POWER_LIMIT_EXCEEDED;
 
-	RESOURCE_STATE_CHANGED(1048576),
-	
-	POWER_LIMIT_EXCEEDED(2097152)
-	;
-	
-	protected int tag;
-	
-	private SchedulingEventType(int tag){
-		this.tag = tag;
-	}
-	
-	public int getTag(){
-		return this.tag;
-	}
 	
 	public String getName(){
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskResumedEvent.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskResumedEvent.java	(revision 1415)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskResumedEvent.java	(revision 1415)
@@ -0,0 +1,22 @@
+package schedframe.events.scheduling;
+
+public class TaskResumedEvent extends SchedulingEvent {
+
+	protected String jobId;
+	protected String taskId;
+	
+	public TaskResumedEvent(String jobId, String taskId) {
+		super(SchedulingEventType.TASK_RESUMED);
+		this.jobId = jobId;
+		this.taskId = taskId;
+	}
+
+	public String getJobId() {
+		return jobId;
+	}
+
+	public String getTaskId() {
+		return taskId;
+	}
+	
+}
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskCanceledEvent.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskCanceledEvent.java	(revision 477)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/TaskCanceledEvent.java	(revision 1415)
@@ -2,4 +2,6 @@
 
 import java.util.List;
+
+import schedframe.events.EventReason;
 
 
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingResponseType.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/SchedulingResponseType.java	(revision 477)
+++ 	(revision )
@@ -1,20 +1,0 @@
-package schedframe.events.scheduling;
-
-public enum SchedulingResponseType {
-
-	TERMINATE_TASK(0),
-	KILL_TASK(0),
-	STOP_AND_RESUME_FROM_CHECKPOINT(0),
-	EXECUTE_ANYWAY(0),
-	ONE_HOUR_GRACE_PERIOD(3600);
-	
-	protected int timer;
-	
-	private SchedulingResponseType(int timer){
-		this.timer = timer;
-	}
-	
-	public int getTimer(){
-		return this.timer;
-	}
-}
Index: DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/EventReason.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/scheduling/EventReason.java	(revision 477)
+++ 	(revision )
@@ -1,24 +1,0 @@
-package schedframe.events.scheduling;
-
-public enum EventReason {
-	//Reasons that caused given events
-	UNKNOWN,
-
-	//task-related
-	//TASK_FAILED
-	APP_FAILURE,
-	SYSTEM_FAILURE,
-	RESOURCE_FAILURE,
-	
-	//TASK_CANCELED
-	RESERVATION_EXCEEDED,
-	RESOURCES_EXCEEDED,
-	
-	//resource/provider-related
-	TEMPORARY_FAILURE,
-	PERMAMENT_FAILURE,
-	
-	
-	SIM_INIT
-	;
-}
Index: DCWoRMS/branches/coolemall/src/schedframe/events/ResourceEventCommand.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/ResourceEventCommand.java	(revision 1316)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/ResourceEventCommand.java	(revision 1415)
@@ -1,4 +1,5 @@
 package schedframe.events;
 
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
 import schedframe.resources.devices.PhysicalResource;
 
@@ -11,5 +12,5 @@
 	}
 
-	public void execute(Event event) {
+	public void execute(ResourceEvent event) {
 		resource.getEventHandler().handleResourceEvent(event);
 	}
Index: DCWoRMS/branches/coolemall/src/schedframe/events/EventReason.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/EventReason.java	(revision 1415)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/EventReason.java	(revision 1415)
@@ -0,0 +1,24 @@
+package schedframe.events;
+
+public enum EventReason {
+	
+	//Reasons that caused given events
+	UNKNOWN,
+
+	//task-related
+	//TASK_FAILED
+	APP_FAILURE,
+	SYSTEM_FAILURE,
+	RESOURCE_FAILURE,
+	
+	//TASK_CANCELED
+	RESOURCES_EXCEEDED,
+	
+	//resource/provider-related
+	TEMPORARY_FAILURE,
+	PERMAMENT_FAILURE,
+	
+	
+	SIM_INIT
+	;
+}
Index: DCWoRMS/branches/coolemall/src/schedframe/events/EventHandler.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/EventHandler.java	(revision 477)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/EventHandler.java	(revision 1415)
@@ -2,8 +2,9 @@
 
 import schedframe.events.scheduling.SchedulingEvent;
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
 
 public interface EventHandler {
 	
-	public void handleResourceEvent(Event event);
+	public void handleResourceEvent(ResourceEvent event);
 	
 	public void handleSchedulingEvent(SchedulingEvent event);
Index: DCWoRMS/branches/coolemall/src/schedframe/events/EventCommand.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/EventCommand.java	(revision 1316)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/EventCommand.java	(revision 1415)
@@ -1,3 +1,5 @@
 package schedframe.events;
+
+import schedframe.resources.computing.profiles.energy.ResourceEvent;
 
 
@@ -5,4 +7,4 @@
 public interface EventCommand {
 	
-	public void execute(Event event);
+	public void execute(ResourceEvent event);
 }
Index: DCWoRMS/branches/coolemall/src/schedframe/events/Event.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/Event.java	(revision 477)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/Event.java	(revision 1415)
@@ -1,5 +1,4 @@
 package schedframe.events;
 
-import schedframe.events.scheduling.EventReason;
 
 public interface Event {
@@ -9,6 +8,4 @@
 	public String getSource();
 	
-	public int getTag();
-	
 	public Object getData();
 	
Index: DCWoRMS/branches/coolemall/src/schedframe/events/EventType.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/EventType.java	(revision 477)
+++ DCWoRMS/branches/coolemall/src/schedframe/events/EventType.java	(revision 1415)
@@ -5,5 +5,3 @@
 	public String getName();
 	
-	public int getTag();
-	
 }
Index: DCWoRMS/branches/coolemall/src/schedframe/events/TaskEvent.java
===================================================================
--- DCWoRMS/branches/coolemall/src/schedframe/events/TaskEvent.java	(revision 478)
+++ 	(revision )
@@ -1,27 +1,0 @@
-package schedframe.events;
-
-import schedframe.scheduling.tasks.WorkloadUnit;
-
-
-
-public class TaskEvent {
-
-	protected WorkloadUnit task;
-	protected String resourceName;
-	
-	public TaskEvent(WorkloadUnit task,
-			 String resourceName) {
-		super();
-		this.task = task;
-		this.resourceName = resourceName;
-	}
-	
-	public WorkloadUnit getTask() {
-		return task;
-	}
-
-	public String getResourceName() {
-		return resourceName;
-	}
-	
-}
