awslabs / payload-offloading-java-common-lib-for-aws

Shared library between AWS extended messaging clients to manage payloads larger than their limits.
Apache License 2.0
32 stars 15 forks source link

Add configurable s3Key as an optional parameter #12

Closed ahmedhammad97 closed 3 years ago

ahmedhammad97 commented 3 years ago

Contributes to issue #11

Description of changes: In this pull request, I added an optional parameter to the PayloadStore.storeOriginalPayload() function, that is to allow consumers to pass custom value for the s3Key.

While Java does not support optional parameters, some workarounds are suggested by the community here, from which I have chosen to use Varargs to maintain backward compatibility.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.