Skip to content
Snippets Groups Projects
Commit decb31bc authored by Luke O'mahony's avatar Luke O'mahony
Browse files

add: sns service for aws

parent b041df03
Branches
No related merge requests found
package com.backend.glowhouse.aws.sns;
import com.amazonaws.services.sns.AmazonSNS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.aws.messaging.core.NotificationMessagingTemplate;
public class SnsNotificationSender {
private final NotificationMessagingTemplate notificationMessagingTemplate;
@Autowired
public SnsNotificationSender(AmazonSNS amazonSns) {
this.notificationMessagingTemplate = new NotificationMessagingTemplate(amazonSns);
}
public void sendIOCommandForLight(String subject, String message) {
this.notificationMessagingTemplate.sendNotification("awsiot_to_localgateway", message, subject);
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment