vaadin / vaadin/framework

Add lifecycle callbacks for when push connection reconnects to new server

Open
#9,281 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
1.8k
Forks
717
Avg merge
2d 6h
Merged PRs (30d)
3

Description

It is desirable for me to know when my clients' push connection reconnects but to a different server as using shared sessions the UI doesn't always re-render correctly thus we want to reload the page when this occurs. A standard way to do this is highly desirable. Right now, I am determining this by checking the clientId attribute of the JSON data coming from the server in a custom MessageHandler as the clientId resets when connecting to a new server. This seems error prone and is less than ideal.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the push connection lifecycle and the MessageHandler/clientId workaround described in the issue. Determine where a public lifecycle callback could distinguish reconnection to a different server, and verify that consumers can use it to trigger a page reload without inspecting JSON data.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.