Class PushSnsService


  • @Named
    public class PushSnsService
    extends Object
    Provides operations to send AWS SNS push messages
    Author:
    Yuriy Movchan Date: 08/31/2017
    • Constructor Detail

      • PushSnsService

        public PushSnsService()
    • Method Detail

      • createSnsClient

        public com.amazonaws.services.sns.AmazonSNS createSnsClient​(String accessKey,
                                                                    String secretKey,
                                                                    String region)
      • createPlatformArn

        public String createPlatformArn​(com.amazonaws.services.sns.AmazonSNS snsClient,
                                        String platformApplicationArn,
                                        String token,
                                        io.jans.as.common.model.common.User user)
      • getCustomUserData

        public String getCustomUserData​(io.jans.as.common.model.common.User user)
      • sendPushMessage

        public com.amazonaws.services.sns.model.PublishResult sendPushMessage​(com.amazonaws.services.sns.AmazonSNS snsClient,
                                                                              PushPlatform platform,
                                                                              String targetArn,
                                                                              Map<String,​Object> customAppMessageMap,
                                                                              Map<String,​com.amazonaws.services.sns.model.MessageAttributeValue> messageAttributes)
                                                                       throws IOException
        Throws:
        IOException
      • sendPushMessage

        public com.amazonaws.services.sns.model.PublishResult sendPushMessage​(com.amazonaws.services.sns.AmazonSNS snsClient,
                                                                              PushPlatform platform,
                                                                              String targetArn,
                                                                              String message,
                                                                              Map<String,​com.amazonaws.services.sns.model.MessageAttributeValue> messageAttributes)
                                                                       throws IOException
        Throws:
        IOException