The app emitts events for created / deleted users
[demos/kafka/outbox] / src / main / java / de / juplo / boot / data / jdbc / UserEvent.java
diff --git a/src/main/java/de/juplo/boot/data/jdbc/UserEvent.java b/src/main/java/de/juplo/boot/data/jdbc/UserEvent.java
new file mode 100644 (file)
index 0000000..fc8877c
--- /dev/null
@@ -0,0 +1,20 @@
+package de.juplo.boot.data.jdbc;
+
+import org.springframework.context.ApplicationEvent;
+
+
+public class UserEvent extends ApplicationEvent
+{
+    public enum Type { CREATED, LOGIN, LOGOUT, DELETED }
+
+    final Type type;
+    final String user;
+
+
+    public UserEvent(Object source, Type type, String user)
+    {
+        super(source);
+        this.type = type;
+        this.user = user;
+    }
+}