JavaScript is disabled on your browser.
Skip navigation links

AWS SDK for Java 1.x API Reference - 1.12.795

We announced the upcoming end-of-support for AWS SDK for Java (v1). We recommend that you migrate to AWS SDK for Java v2. For dates, additional details, and information on how to migrate, please refer to the linked announcement.
com.amazonaws.services.sns.message

Class SnsMessageManager



  • public class SnsMessageManager
    extends Object 
    Unmarshalls an SNS message and validates it using the SNS public certificate.
    • Constructor Detail

      • SnsMessageManager

        public SnsMessageManager()
        Creates an SnsMessageManager using the AWS region obtained from the environment. See Region Selection for more information.
      • SnsMessageManager

        public SnsMessageManager(String region)
        Creates an SnsMessageManager pinned to the given region. This handler will throw an exception if it recieves a message from another region. If you must handle messages from multiple regions then you should maintain a cache of region to SnsMessageManager instances.
        Parameters:
        region - Region to pin handler to.
    • Method Detail

      • parseMessage

        public SnsMessage parseMessage(InputStream messageBody)
        Unmarshalls a message into a subclass of SnsMessage. This will automatically validate the authenticity of the mesage to ensure it was sent by SNS. If the validity of the message cannot be verified an exception will be thrown.
        Parameters:
        messageBody - Input stream containing message JSON.
        Returns:
        Unmarshalled message object.
      • handleMessage

        public void handleMessage(InputStream messageBody,
         SnsMessageHandler handler)
        Unmarshalls a message and delivers it to the given handler.
        Parameters:
        messageBody - Input stream containing message JSON.
        handler - Handler to process message.
Skip navigation links

AltStyle によって変換されたページ (->オリジナル) /