Move notification API to Nenjim

This commit is contained in:
2026-06-09 20:40:57 +02:00
parent 710ca98b43
commit 7935c8ae52
4 changed files with 28 additions and 0 deletions
@@ -0,0 +1,14 @@
package com.r35157.libs.notification;
import java.io.IOException;
public interface AddressedNotifier<
D extends NotificationDestination,
M extends NotificationMessage>
{
void push(D destination, M message) throws IOException;
default BoundNotifier<M> bind(D destination) {
return message -> push(destination, message);
}
}
@@ -0,0 +1,7 @@
package com.r35157.libs.notification;
import java.io.IOException;
public interface BoundNotifier<M extends NotificationMessage> {
void push(M message) throws IOException;
}
@@ -0,0 +1,3 @@
package com.r35157.libs.notification;
public interface NotificationDestination {}
@@ -0,0 +1,4 @@
package com.r35157.libs.notification;
public interface NotificationMessage {
}