On 09/21/2011 04:14 PM, Rajith Attapattu wrote:
> There is a get/setObjectProperty method available in the Message interface.
> As per the spec the type of the property value should be one of
> Boolean, Number or String.
>
> However we use this as an extension point to allow byte[] atm.
> I believe there is a JIRA asking to allow UUID. It also makes sense to
> allow lists and Maps as well as the AMQP spec has defined encodings
> and hence can be retrieved by an AMQP complaint client.
>
> JMS defines that any property value should be able to be retrieved as a String.
> Hence the reason why we drop any properties from the
> getPropertyNames() enumeration who value is not a String, Boolean or a
> Number.
>
> But that doesn't mean those properties with values like byte[] (and
> soon UUID, list and maps) should are unaccessible.
> If an application wants to retrieve a byte[] they can use the
> getObjectProperty method to do so.
>
Ok, I understand though that seems a little odd to me. I would probably
have kept the name in the enumeration and returned some stringification
of that if getStringProperty is called that makes it clear the value is
in fact a byte array.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org
|