All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pl.chilldev.commons.aws.sns.SimpleNotificationHandler Maven / Gradle / Ivy

There is a newer version: 0.4.4
Show newest version
/**
 * This file is part of the ChillDev-Commons.
 *
 * @license http://mit-license.org/ The MIT license
 * @copyright 2017 © by Rafał Wrzeszcz - Wrzasq.pl.
 */

package pl.chilldev.commons.aws.sns;

import java.util.function.Consumer;

import com.amazonaws.services.lambda.runtime.events.SNSEvent;

/**
 * SNS notifications handler that simply processes notification body.
 */
public class SimpleNotificationHandler extends NotificationHandler
{
    /**
     * Initializes notification handler.
     *
     * @param messageBodyHandler SNS message handler
     */
    public SimpleNotificationHandler(Consumer messageBodyHandler)
    {
        super((SNSEvent.SNS data) -> messageBodyHandler.accept(data.getMessage()));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy