Class MessageDecodeOptions
java.lang.Object
org.apache.qpid.proton.message.MessageDecodeOptions
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the maximum decode depth allowed before error when decoding Maps, Lists, Arrays, and certain related DescribedTypes from an encoded payload.intGets the configured maximum number of elements that can be decoded from an array encoded with the zero-width elements (ulong0, uint0, list0, boolean-true, boolean-false, null).setMaxDecodeDepth(int maxDecodeDepth) Configures the maximum decode depth allowed before error when decoding Maps, Lists, Arrays, and certain related DescribedTypes from an encoded payload.setZeroWidthArrayElementLimit(int zeroWidthElementLimit) Configures the maximum number of array elements allowed while decoding arrays of zero-width elements (ulong0, uint0, list0, boolean-true, boolean-false, null) before a decode exception.
-
Constructor Details
-
MessageDecodeOptions
public MessageDecodeOptions()New decode options with default values.
-
-
Method Details
-
getZeroWidthArrayElementLimit
public int getZeroWidthArrayElementLimit()Gets the configured maximum number of elements that can be decoded from an array encoded with the zero-width elements (ulong0, uint0, list0, boolean-true, boolean-false, null).- Returns:
- the max number of zero-width array elements allowed.
-
setZeroWidthArrayElementLimit
Configures the maximum number of array elements allowed while decoding arrays of zero-width elements (ulong0, uint0, list0, boolean-true, boolean-false, null) before a decode exception. Default is 0, meaning only the empty array is permitted.- Parameters:
zeroWidthElementLimit- The configured max zero-width elements allowed.- Returns:
- this
MessageDecodeOptionsinstance.
-
getMaxDecodeDepth
public int getMaxDecodeDepth()Returns the maximum decode depth allowed before error when decoding Maps, Lists, Arrays, and certain related DescribedTypes from an encoded payload.- Returns:
- the maximum depth limit before error for Maps, Lists, Arrays and related DescribedTypes.
-
setMaxDecodeDepth
Configures the maximum decode depth allowed before error when decoding Maps, Lists, Arrays, and certain related DescribedTypes from an encoded payload. Default is 32.- Parameters:
maxDecodeDepth- The configured max decode depth allowed.- Returns:
- this
MessageDecodeOptionsinstance.
-