Class InAppNotificationChannel<T extends InAppNotificationBase>

java.lang.Object
io.leandev.appfuse.notification.channel.InAppNotificationChannel<T>
Type Parameters:
T - 應用宣告的具體站內信 entity(繼承 InAppNotificationBase
All Implemented Interfaces:
NotificationChannel

public class InAppNotificationChannel<T extends InAppNotificationBase> extends Object implements NotificationChannel

IN_APP 通道(Phase 3):遞送即寫一列站內信

不經外部 provider——「遞送」就是把通知存進 DB,使用者經 app REST API 讀取。位址=userId (由 Recipient.addressFor(ChannelType) 對 IN_APP 回傳)。

ADR-017:具體站內信 entity 由應用宣告,故本通道泛型化於 InAppNotificationBase,並以 entityFactory(應用注入的 T::new)建立實體。不設租戶——tenant 專案的 entity 帶 @TenantId,遞送在 dispatcher 的 TenantContext.runAs(String, Runnable) 內執行,Hibernate 於 persist 時自動填入 當前租戶(決策三);ownership 專案的 entity 無租戶欄位。jar 全程不觸碰租戶欄位。

Since:
4.0.0