Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ability to define global encoders and decoders #198

Open
glassfishrobot opened this issue May 10, 2013 · 4 comments
Open

Add the ability to define global encoders and decoders #198

glassfishrobot opened this issue May 10, 2013 · 4 comments
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Milestone

Comments

@glassfishrobot
Copy link

In a future version of the WebSocket API, I would love to see the ability to specify global encoders and decoders both of the client and server side. This could be very similar to how you can specify JAX-RS 2 providers today (e.g. to globally handle JSON encoding/decoding with a generic tool).

Do let me know if anything needs to be explained further - I am happy to help.

Please note that these are purely my personal views and certainly not of Oracle's as a company.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by reza_rahman

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
beamerblvd said:
We could add a new annotation, @WebSocketCodecs, that can be applied to types used as WebSocket messages. For example:

@WebSocketCodecs(
        encoders = { MyEncoderText.class, MyEncoderBinary.class },
        decoders = { MyDecoderText.class, MyDecoderBinary.class }
)
public class MyMessageObject
{
    ...
}

The encoders and decoders attributes must have at least one and may have at most four values: a text encoder/decoder, a binary encoder/decoder, a text stream encoder/decoder, and a binary stream encoder/decoder.

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA WEBSOCKET_SPEC-198

@glassfishrobot
Copy link
Author

@markt-asf markt-asf added API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one Jakarta EE 10 and removed Priority: Major Type: Improvement labels May 14, 2020
@markt-asf markt-asf added this to the backlog milestone May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API (Both) Impacts the client and server API enhancement Adding a new feature or improving an existing one
Projects
None yet
Development

No branches or pull requests

2 participants