Vaadin websocket to update changes on page vaadin 8.2.1

I want to use websocket which will get updates from socket server and vaadin will push that changes to application’s specific page.
Websocket sometimes return json string of records by using this I want to update grid data.

Just please let me know how can I use websocket to get data from socket server and same time update page data by vaadin push.

Not only first UI page but also I want to push changes on other pages of application. how can I do this ?


i am not quit sure what is the problem, but here are the docs:

You make sure that you are realy using WS in browser console and you are good to go. Afaik UI has only one page, but client can have multiple UI.

com.vaadin.server.VaadinSession.getUIs() will give you all UIs for current user session you can push to all.

If you want broadcast messages for ALL users, you need some sort of Session Registry to obtain all users sessions.