package com.r35157.service.notification;

import org.jetbrains.annotations.NotNull;

import java.io.IOException;

/**
 * Sends notification messages through a fully configured transport and
 * destination.
 *
 * <p>Consumers of this interface do not need to know which transport is used
 * or how its destination is configured.</p>
 */
@FunctionalInterface
public interface BoundNotificationService {
    /**
     * Sends a notification message.
     *
     * @param message the non-blank notification text
     * @throws IllegalArgumentException if {@code message} is {@code null},
     *                                  empty, or blank
     * @throws IOException if synchronous notification delivery fails
     */
    void push(@NotNull ΩNotificationMessageΩ message) throws IOException;
}
