-
Notifications
You must be signed in to change notification settings - Fork 57
Customize object mapper for WampClient (again) #85
Comments
There are problem with implementation. In geneneral case, client needs at least two ObjectMappers: one for json, and one for msgpack. There are several ways for obtaining configured instances, but all of them has drawbacks.
Third option looks better then others. |
After closely look at the code, I realize that ObjectMapper could be customized right now, without any changes. Just appply configuration settings to static instances in But using static non-constant fields is bad desing, it could be used as a quick hack, but not in general. For example, application need to receive(or send) messages with several excluding ObjectMapper propeties. It is impossinble in current implementation, but would be easy in case of per-client mappers. Of cource, it is extreamly rare case, but, since jawampa is a library, it is still possible. Implementing per-client ObjectMappers require significant changes, and I would like to discuss it with @Matthias247 (or another mainteiner) first. |
@the20login thank you for this information. I think I only need to configure objectMapper during "building" process though WampClientBuilder. |
Some time ago I have implemented setter for object mapper for issue #79
Unfortunately, I made a mistake, my commit is useless. Jawampa client use not one, not two, but THREE different instances of ObjectMapper, and I replace only one of them.
I will provide correct implementation in several days.
The text was updated successfully, but these errors were encountered: