Extensible and configurable WebSocket messages

WebSockets provide a flexible bi-directional way to communicate between the web browser and the backend server. In particular, it allows the server to send push messages to the client in order to inform it about data updates and the like.

However, the Java API only allows for static Object encoders and decoders, i.e. they cannot use dependency injection. We will show here to circumvent this problem and provide extensible message encoding using JSON.

Continue reading