Skip to content

1.1 Sending Notifications

Anders Mikkelsen edited this page Dec 14, 2017 · 2 revisions

This section defines how to send notifications.

This functionality can be easily distributed onto the eventbus, and have a client implementation for building the notifications.

@ProxyGen
@VertxGen
public interface NotificationsService {
    Logger logger = LoggerFactory.getLogger(NotificationsService.class.getSimpleName());

    @Fluent
    NotificationsService sendTopicNotification(JsonObject messageBody, Handler<AsyncResult<Boolean>> resultHandler);

    @Fluent
    NotificationsService sendUserNotification(JsonObject messageBody, Handler<AsyncResult<Boolean>> resultHandler);

    @ProxyClose
    void close();
}

This body is the body as defined by FCM as payload.

Clone this wiki locally