Package com.google.gwt.user.client

Examples of com.google.gwt.user.client.Timer


      reconnectionTimer.cancel();
      heartbeatTimer.cancel();
    }
   
    private Timer createConnectionTimer() {
      return new Timer() {
        @Override
        public void run() {
          doDisconnect();
          doOnError(new TimeoutException(url, connectionTimeout), false, CometClientTransportWrapper.this);
        }
View Full Code Here


        }
      };
    }
   
    private Timer createHeartbeatTimer() {
      return new Timer() {
        @Override
        public void run() {
          double currentTimeMillis = Duration.currentTimeMillis();
          double difference = currentTimeMillis - lastReceivedTime;
          if (difference >= heartbeatTimeout) {
View Full Code Here

        }
      };
    }
   
    private Timer createReconnectionTimer() {
      return new Timer() {
        @Override
        public void run() {
          if (running) {
            doConnect();
          }
View Full Code Here

     * A Timer that every 20s check
     * if everything is working.
     *
     */
    private void createWatchDogTimer() {
        Timer t = new Timer() {

            public void run() {
                if (!keepAlive) {
                    alert("the dog is angry !!! Awake streaming !!!");
                    restartStreamingFromIFrame();
                }

                keepAlive = false;
            }
        };
        t.scheduleRepeating(watchDogTimerTime);
    }
View Full Code Here

   

    public TailCall processLeavingTail(final XPathContext context) throws XPathException {
        IntegerValue time = (IntegerValue)wait.evaluateItem(context);
        final CallTemplate.CallTemplatePackage pack = (CallTemplate.CallTemplatePackage)call.processLeavingTail(context);
        Timer t = new Timer() {
            public void run() {
                //Window.setTitle("Timer fired " + serial++);
              boolean success = false;
                logger.fine("processing ixsl:schedule-action");
              if (LogConfiguration.loggingIsEnabled() && LogController.traceIsEnabled()) {
                LogController.openTraceListener();
              }
                try {
                    TailCall tc = pack.processLeavingTail();
                    while (tc != null) {
                        tc = tc.processLeavingTail();
                    }
                    context.getController().getPendingUpdateList().apply(context);
                    success = true;
                } catch (Exception err) {
                  logger.log(Level.SEVERE, "In delayed event: " + err.getMessage());
                  if (SaxonceApi.doThrowJsExceptions()) {
                    throw new RuntimeException(err.getMessage());
                  }
                }
              if (LogConfiguration.loggingIsEnabled() && LogController.traceIsEnabled()) {
                LogController.closeTraceListener(success);
              }
            }
        };
        //Window.setTitle("Timer started " + serial + " (time " + time + "ms)");
        t.schedule(time.getIntValue());
        return null;
    }
View Full Code Here

            Log.error("Status Panel problem: ");
        }

        // create the Local Server after enough of a delay so that we try
        // to appear as lightweight as possible.
        new Timer() {
            @Override
            public void run() {
                try {
                    doLocalServer();
                } catch (Exception e) {
View Full Code Here

            // expected in hosted mode. catches JS exception from setting
            // 8080 when running on 8888
            throw new GearsException(e.getMessage());
        }

        new Timer() {
            public void run() {
                switch (managedResourceStore.getUpdateStatus()) {
                case ManagedResourceStore.UPDATE_OK:
                    Log.info("UPDATE_OK "
                            + managedResourceStore.getCurrentVersion());
View Full Code Here

    }
    canvas.saveContext();
    canvas.setLineWidth(2);
    canvas.setStrokeStyle(new Color(255,0,0));
 
    t = new Timer() {
      public void run() {
        renderingLoop();
      }
    };
    t.schedule(10);
View Full Code Here

    timer.cancel();
  }
 
  private void animateLogo() {
   
    timer = new Timer() {

      @Override
      public void run() {
        renderingLoop()
      }
View Full Code Here

    });

    debugTable.setVisible(false);
    RootPanel.get().add(debugTable, 0, 0);

    timer = new Timer() {
      public void run() {
        dirty = false;
        logTextArea.setHTML(logTextArea.getHTML() + logText);
        logText = "";
        DeferredCommand.addCommand(new Command() {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.Timer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.