Session Expired Notification before Closing the Session

Hi ,

I need to display the notification to the user before closing the Session . Notification is like popup window contains message "Your session will expire in 2 mins(for example) and with the Timer and two buttoons like “stay alive”.If user clicks on stay alive before two minutes session will not close and continue the action.Else session will close and logout the user. This is my requirement.

I saw one example implementing session expired by using vaadin refresher addon. But if i use refresher it contineously sends request to the server then my session will never expire.

And i saw the smart sessions and session guard addons but these are not supported by vaadin7.

How to solve this problem? How will i know exatly session will expire in 2 mins.That is if i set session timeout 30mins. I want to notify the user at 28th minute and wants conformation?