Websockets allow you to communicate bidirectional and full duplex over TCP, between your server and different kind of clients (browser’s, JavaFX… ). It’s basically a push technology, where, for example events or data originating from the server or a client, can be pushed to all the other connected clients.
In our demo , JSON strings are send between client and server, so that’s where the JSON Processing API comes in. It’s a portable API that allows you to parse, generate, transform and query JSON by using the streaming or model API. But you could also send XML or any other proprietary format.
- A java class annotated with
@ServerEndpoint(value= »/endpoint », decoders=EncodeDecode.class, encoders=EncodeDecode.class)
with following method annotations :
@OnOpen : when…
View original post 317 mots de plus