List of usage examples for com.vaadin.client.communication ServerRpcQueue isFlushPending
public boolean isFlushPending()
From source file:com.haulmont.cuba.web.toolkit.ui.client.timer.CubaTimerConnector.java
License:Apache License
public void onTimer() { if (running) { if (getState().listeners) { ServerRpcQueue rpcQueue = getConnection().getServerRpcQueue(); if (rpcQueue.isEmpty() || !rpcQueue.isFlushPending()) { // if application stopped we will not schedule new timer event if (getConnection().isApplicationRunning()) { rpc.onTimer();//from ww w. ja v a2 s. co m } } else { jsTimer.schedule(DEFFERED_DELAY_MS); } } else { requestCompleted(); } } }