jakartaee / jakartaee/messaging

StreamMessage#getBody(Class<T>)

Open
#144 5 comments 0 reactions 0 assignees View on GitHub
jms21-forreview-minor Priority: Major Type: Improvement
Dominant language
Java
Stars
49
Forks
34
PR merge metrics
No merged PRs in 30d

Description

Logged on behalf of Philippe Marschall, who posted this to the community alias:
[https://java.net/projects/jms-spec/lists/users/archive/2013-12/message/16](https://java.net/projects/jms-spec/lists/users/archive/2013-12/message/16)

> Since it's time to gather ideas for JMS 2.1 I thought I'd mention this early. 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.
#### Affected Versions
[2.0]

Contributor guide

Open the contributing guide

Research direction

Start by reviewing StreamMessage#getBody(Class) and #isBodyAssignableTo(Class) against the JMS 2.0 behavior, then examine the requested InputStream, OutputStream, Reader, and Writer conversions. Done means the JMS 2.1 behavior is clearly specified and both methods consistently support the agreed conversions for the relevant message modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.