Omslachtigheid van actions en type in event omgeschreven naar action enum met parameter voor type. Type hernoemd naar target, dat dekt de lading beter. Mogelijkheid om ook device als target te gebruiken? En op die manier feedback versturen? Het event is nu bedoeld om events van services naar de devices te versturen.

This commit is contained in:
2011-02-04 21:23:01 +00:00
parent df91eab859
commit 1c61ac62fd
11 changed files with 77 additions and 60 deletions

View File

@@ -3,15 +3,15 @@ package pm.event;
import pm.action.Action;
public class Event {
protected Type type;
protected Target type;
protected Action action;
public Event(Type type, Action action) {
public Event(Target type, Action action) {
this.type = type;
this.action = action;
}
public Type getType() {
public Target getType() {
return type;
}

View File

@@ -0,0 +1,5 @@
package pm.event;
public enum Target {
MAIN, DEVICE, APPLICATION;
}

View File

@@ -1,5 +0,0 @@
package pm.event;
public enum Type {
MAIN, APPLICATION;
}