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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
5
java/src/pm/event/Target.java
Normal file
5
java/src/pm/event/Target.java
Normal file
@@ -0,0 +1,5 @@
|
||||
package pm.event;
|
||||
|
||||
public enum Target {
|
||||
MAIN, DEVICE, APPLICATION;
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package pm.event;
|
||||
|
||||
public enum Type {
|
||||
MAIN, APPLICATION;
|
||||
}
|
||||
Reference in New Issue
Block a user