users@jms-spec.java.net

[jms-spec users] StreamMessage#getBody(Class<T>)

From: Philippe Marschall <kustos_at_gmx.net>
Date: Thu, 26 Dec 2013 11:02:00 +0100

Hi

Since it's time to gather ideas for JMS 2.1 I thought I'd mention this
eary. I noted that #getBody does not have any conversions defined for
StreamMessage. IMHO it would be really convenient if the following
conversions where offered:

- java.io.InputStream (if the message is not in write-only mode)
- java.io.OutputStream (if the message is not in read-only mode)
- java.io.Reader (if the message is not in write-only mode)
- java.io.Writer (if the message is not in read-only mode)

This would also make it very easy to plug StreamMessage into anything
else that does stream oriented IO in Java.

Obviously #isBodyAssignableTo(Class) would have to be updated as well.

Cheers
Philippe