Class RequestPayloadCalculator
- java.lang.Object
-
- software.amazon.awssdk.services.sqs.internal.batchmanager.RequestPayloadCalculator
-
@SdkInternalApi public final class RequestPayloadCalculator extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <RequestT> Optional<Integer>calculateMessageSize(RequestT request)Evaluates the total size of the message body, message attributes, and message system attributes for a SendMessageRequest.
-
-
-
Method Detail
-
calculateMessageSize
public static <RequestT> Optional<Integer> calculateMessageSize(RequestT request)
Evaluates the total size of the message body, message attributes, and message system attributes for a SendMessageRequest. If the request is not a SendMessageRequest, returns an empty Optional.- Type Parameters:
RequestT- the type of the request- Parameters:
request- the request to evaluate- Returns:
- an Optional containing the total size in bytes if the request is a SendMessageRequest, otherwise an empty Optional
-
-