Try to implement your own DeploymentConfiguration
in the following way:
public class ExampleUI extends UI {
private class ExampleConfiguration implements DeploymentConfiguration {
@Override
public int getHeartbeatInterval() {
return 30;
}
@Override
public boolean isCloseIdleSessions() {
return true;
}
}
@Override
protected void init(VaadinRequest request) {
getSession().setConfiguration(new ExampleConfiguration());
...
}
}
Then you can get context parameters outside ExampleUI
class in a standard way:
VaadinSession.getCurrent().getConfiguration().getHeartbeatInterval();
VaadinSession.getCurrent().getConfiguration().isCloseIdleSessions();
I hope this helps.