Interface PushNotificationHandler

    • Method Detail

      • publish

        <T> void publish​(PushNotificationEventContext<T> context,
                         Long networkId,
                         Supplier<T> dataSupplier)
        Publishes a PushNotificationEvent to matching subscriptions, only calling the data supplier if some subscription is found. ATTENTION: The dataSupplier runs in another transaction, not the same as the caller. As such, it can't use any entities previously loaded, but find them again inside the supplier.
        Parameters:
        networkId - The network in which the transaction of the dataSupplier will run. When the dataSupplier is null or supplies a constant value, use publish(PushNotificationEventContext, Object) instead, so an unnecessary transaction won't be opened.