Class PushSnsService


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

      Constructors 
      Constructor Description
      PushSnsService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String createPlatformArn​(com.amazonaws.services.sns.AmazonSNS snsClient, java.lang.String platformApplicationArn, java.lang.String token, io.jans.as.common.model.common.User user)  
      com.amazonaws.services.sns.AmazonSNS createSnsClient​(java.lang.String accessKey, java.lang.String secretKey, java.lang.String region)  
      java.lang.String getCustomUserData​(io.jans.as.common.model.common.User user)  
      com.amazonaws.services.sns.model.PublishResult sendPushMessage​(com.amazonaws.services.sns.AmazonSNS snsClient, PushPlatform platform, java.lang.String targetArn, java.lang.String message, java.util.Map<java.lang.String,​com.amazonaws.services.sns.model.MessageAttributeValue> messageAttributes)  
      com.amazonaws.services.sns.model.PublishResult sendPushMessage​(com.amazonaws.services.sns.AmazonSNS snsClient, PushPlatform platform, java.lang.String targetArn, java.util.Map<java.lang.String,​java.lang.Object> customAppMessageMap, java.util.Map<java.lang.String,​com.amazonaws.services.sns.model.MessageAttributeValue> messageAttributes)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PushSnsService

        public PushSnsService()
    • Method Detail

      • createSnsClient

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

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

        public java.lang.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,
                                                                              java.lang.String targetArn,
                                                                              java.util.Map<java.lang.String,​java.lang.Object> customAppMessageMap,
                                                                              java.util.Map<java.lang.String,​com.amazonaws.services.sns.model.MessageAttributeValue> messageAttributes)
                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • sendPushMessage

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