run.halo.app.notification.NotificationCenter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
API of halo project, connecting by other projects.
The newest version!
package run.halo.app.notification;
import reactor.core.publisher.Mono;
import run.halo.app.core.extension.notification.Reason;
import run.halo.app.core.extension.notification.Subscription;
/**
* Notification center to notify and manage notifications.
*
* @author guqing
* @since 2.10.0
*/
public interface NotificationCenter {
/**
* Notifies the subscriber with the given reason.
*
* @param reason reason to notify
*/
Mono notify(Reason reason);
/**
* Subscribes to the given subject with the given reason.
*
* @param subscriber subscriber to subscribe to
* @param reason interest reason to subscribe
* @return a subscription
*/
Mono subscribe(Subscription.Subscriber subscriber,
Subscription.InterestReason reason);
/**
* Unsubscribes by the given subject.
*
* @param subscriber subscriber to unsubscribe
*/
Mono unsubscribe(Subscription.Subscriber subscriber);
/**
* Unsubscribes by the given subject and reason.
*
* @param subscriber subscriber to unsubscribe
* @param reason reason to unsubscribe
*/
Mono unsubscribe(Subscription.Subscriber subscriber, Subscription.InterestReason reason);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy