Class DefaultSnsMessageManager
- java.lang.Object
-
- software.amazon.awssdk.messagemanager.sns.internal.DefaultSnsMessageManager
-
- All Implemented Interfaces:
AutoCloseable,SnsMessageManager,SdkAutoCloseable
@SdkInternalApi public final class DefaultSnsMessageManager extends Object implements SnsMessageManager
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface software.amazon.awssdk.messagemanager.sns.SnsMessageManager
SnsMessageManager.Builder
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SnsMessageManager.Builderbuilder()Creates a builder for configuring and creating anSnsMessageManager.voidclose()Close thisSnsMessageManager, releasing any resources it owned.SnsMessageparseMessage(InputStream message)Parses and validates an SNS message from a stream.SnsMessageparseMessage(String message)Parses and validates an SNS message from a string.
-
-
-
Method Detail
-
parseMessage
public SnsMessage parseMessage(InputStream message)
Description copied from interface:SnsMessageManagerParses and validates an SNS message from a stream.This method reads the JSON message payload, validates the signature, returns a parsed SNS message object with all message attributes if validation succeeds.
- Specified by:
parseMessagein interfaceSnsMessageManager- Parameters:
message- The binary stream representation of the SNS message.- Returns:
- The parsed SNS message.
-
parseMessage
public SnsMessage parseMessage(String message)
Description copied from interface:SnsMessageManagerParses and validates an SNS message from a string.This method reads the JSON message payload, validates the signature, returns a parsed SNS message object with all message attributes if validation succeeds.
- Specified by:
parseMessagein interfaceSnsMessageManager- Parameters:
message- The string representation of the SNS message.- Returns:
- the parsed SNS message.
-
close
public void close()
Description copied from interface:SnsMessageManagerClose thisSnsMessageManager, releasing any resources it owned.Note: if you provided your own
SdkHttpClient, you must close it separately.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSdkAutoCloseable- Specified by:
closein interfaceSnsMessageManager
-
builder
public static SnsMessageManager.Builder builder()
Description copied from interface:SnsMessageManagerCreates a builder for configuring and creating anSnsMessageManager.- Returns:
- A new builder.
-
-