Class MessageAttributeValue
- All Implemented Interfaces:
Serializable
,Cloneable
The user-specified message attribute value. For string data types, the value attribute has the same restrictions on the content as the message body. For more information, see SendMessage.
Name, type, and value must not be empty or null. In addition, the message body should not be empty or null. All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is currently 256 KB (262,144 bytes).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()
boolean
Not implemented.Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.Amazon SQS supports the following logical data types: String, Number, and Binary.Not implemented.Strings are Unicode with UTF8 binary encoding.int
hashCode()
void
setBinaryListValues
(Collection<ByteBuffer> binaryListValues) Not implemented.void
setBinaryValue
(ByteBuffer binaryValue) Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.void
setDataType
(String dataType) Amazon SQS supports the following logical data types: String, Number, and Binary.void
setStringListValues
(Collection<String> stringListValues) Not implemented.void
setStringValue
(String stringValue) Strings are Unicode with UTF8 binary encoding.toString()
Returns a string representation of this object; useful for testing and debugging.withBinaryListValues
(ByteBuffer... binaryListValues) Not implemented.withBinaryListValues
(Collection<ByteBuffer> binaryListValues) Not implemented.withBinaryValue
(ByteBuffer binaryValue) Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.withDataType
(String dataType) Amazon SQS supports the following logical data types: String, Number, and Binary.withStringListValues
(String... stringListValues) Not implemented.withStringListValues
(Collection<String> stringListValues) Not implemented.withStringValue
(String stringValue) Strings are Unicode with UTF8 binary encoding.
-
Constructor Details
-
MessageAttributeValue
public MessageAttributeValue()
-
-
Method Details
-
setStringValue
Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
- Parameters:
stringValue
- Strings are Unicode with UTF8 binary encoding. For a list of code values, see http ://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
-
getStringValue
Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
- Returns:
- Strings are Unicode with UTF8 binary encoding. For a list of code values, see http ://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
-
withStringValue
Strings are Unicode with UTF8 binary encoding. For a list of code values, see http://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.
- Parameters:
stringValue
- Strings are Unicode with UTF8 binary encoding. For a list of code values, see http ://en.wikipedia.org/wiki/ASCII#ASCII_printable_characters.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setBinaryValue
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
AWS SDK for Java performs a Base64 encoding on this field before sending this request to AWS service by default. Users of the SDK should not perform Base64 encoding on this field.
Warning: ByteBuffers returned by the SDK are mutable. Changes to the content or position of the byte buffer will be seen by all objects that have a reference to this object. It is recommended to call ByteBuffer.duplicate() or ByteBuffer.asReadOnlyBuffer() before using or reading from the buffer. This behavior will be changed in a future major version of the SDK.
- Parameters:
binaryValue
- Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
-
getBinaryValue
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
ByteBuffer
s are stateful. Calling theirget
methods changes theirposition
. We recommend usingByteBuffer.asReadOnlyBuffer()
to create a read-only view of the buffer with an independentposition
, and callingget
methods on this rather than directly on the returnedByteBuffer
. Doing so will ensure that anyone else using theByteBuffer
will not be affected by changes to theposition
.- Returns:
- Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
-
withBinaryValue
Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.
- Parameters:
binaryValue
- Binary type attributes can store any binary data, for example, compressed data, encrypted data, or images.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getStringListValues
Not implemented. Reserved for future use.
- Returns:
- Not implemented. Reserved for future use.
-
setStringListValues
Not implemented. Reserved for future use.
- Parameters:
stringListValues
- Not implemented. Reserved for future use.
-
withStringListValues
Not implemented. Reserved for future use.
NOTE: This method appends the values to the existing list (if any). Use
setStringListValues(java.util.Collection)
orwithStringListValues(java.util.Collection)
if you want to override the existing values.- Parameters:
stringListValues
- Not implemented. Reserved for future use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withStringListValues
Not implemented. Reserved for future use.
- Parameters:
stringListValues
- Not implemented. Reserved for future use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getBinaryListValues
Not implemented. Reserved for future use.
- Returns:
- Not implemented. Reserved for future use.
-
setBinaryListValues
Not implemented. Reserved for future use.
- Parameters:
binaryListValues
- Not implemented. Reserved for future use.
-
withBinaryListValues
Not implemented. Reserved for future use.
NOTE: This method appends the values to the existing list (if any). Use
setBinaryListValues(java.util.Collection)
orwithBinaryListValues(java.util.Collection)
if you want to override the existing values.- Parameters:
binaryListValues
- Not implemented. Reserved for future use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withBinaryListValues
Not implemented. Reserved for future use.
- Parameters:
binaryListValues
- Not implemented. Reserved for future use.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setDataType
Amazon SQS supports the following logical data types: String, Number, and Binary. For the Number data type, you must use StringValue.
You can also append custom labels. For more information, see Message Attribute Data Types.
- Parameters:
dataType
- Amazon SQS supports the following logical data types: String, Number, and Binary. For the Number data type, you must use StringValue.You can also append custom labels. For more information, see Message Attribute Data Types.
-
getDataType
Amazon SQS supports the following logical data types: String, Number, and Binary. For the Number data type, you must use StringValue.
You can also append custom labels. For more information, see Message Attribute Data Types.
- Returns:
- Amazon SQS supports the following logical data types: String,
Number, and Binary. For the Number data type, you must use
StringValue.
You can also append custom labels. For more information, see Message Attribute Data Types.
-
withDataType
Amazon SQS supports the following logical data types: String, Number, and Binary. For the Number data type, you must use StringValue.
You can also append custom labels. For more information, see Message Attribute Data Types.
- Parameters:
dataType
- Amazon SQS supports the following logical data types: String, Number, and Binary. For the Number data type, you must use StringValue.You can also append custom labels. For more information, see Message Attribute Data Types.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toString
Returns a string representation of this object; useful for testing and debugging. -
equals
-
hashCode
public int hashCode() -
clone
-