Problem with vaadin Session in Background Thread

I am faceing problem with vaadin session in background thread. The problem is that when I logged in at first fime I set the IP address in header and send to thirdparty service and they save it and now I want to Lock UI for 30 Sec. and get the IP address from header with background thread.
I am doing Like This but It returns Null

String ipAddress = VaadinService.getCurrentRequest().getHeader(“StringForHeader”);

How I will Lock The UI and How to get IP from Header