Package org.waveprotocol.wave.client.scheduler.Scheduler

Examples of org.waveprotocol.wave.client.scheduler.Scheduler.Task


          synchronizer.tick();
        }
      });

      // Defer everything else, to let the RPC go out.
      SchedulerInstance.getMediumPriorityTimer().scheduleDelayed(new Task() {
        @Override
        public void execute() {
          installStatics();
          synchronizer.tick();
        }
View Full Code Here


   * executed.
   */
  public void testMultipleTasksAtSameTime() {
    final int time = 100;
    timer.scheduleDelayed(oneoff, time);
    final Task anotherTask = mock(Task.class, "another_task");
    timer.scheduleDelayed(anotherTask, time);
    checking(new Expectations() {{
      one(oneoff).execute();
      one(anotherTask).execute();
    }});
View Full Code Here

    this.canned = canned;
  }

  @Override
  public Request search(String query, final int index, final int numResults, final Callback callback) {
    timer.scheduleDelayed(new Task() {
      @Override
      public void execute() {
        int from = Math.min(index, canned.size() - 1);
        int to = Math.max(index + numResults, canned.size());
        callback.onSuccess(canned.size(), canned.subList(from, to));
View Full Code Here

    if (isTyping()) {
      currentSelectionBias = BiasDirection.LEFT;
      return;
    }

    SchedulerInstance.getHighPriorityTimer().schedule(new Task() {
      @Override
      public void execute() {
        CursorDirection current = lastDirection;
        if (!settings.useFancyCursorBias()) {
          current = CursorDirection.FROM_LEFT;
View Full Code Here

   */
  void noteErrorWithImplMutation(Exception e) {
    // TODO(danilatos, mtsui): Better handling, see why we are throwing
    // exceptions in the first place and what sorts of exceptions.
    logger.error().log(e + " Scheduling revert.");
    ScheduleCommand.addCommand(new Task() {
      public void execute() {
        getRepairer().revert(Point.inElement(getParentElement(), ContentNode.this), null);
      }
    });
  }
View Full Code Here

  // by the ENABLE_CACHE value, but Eclipse does not recognise "deadCode".
  @SuppressWarnings("all")
  public void instantiateDoodadInHTML(
      final HTML target, final PluginContext pluginContext, final String url) {
    if (ENABLE_CACHE && cache.containsKey(url)) {
      SchedulerInstance.getMediumPriorityTimer().schedule(new Task() {
        @Override
        public void execute() {
          // Use isAttached as a cheap approximation of doodad still being active.
          if (target.isAttached()) {
            appendToDocument(target, pluginContext, cache.get(url));
View Full Code Here

   *
   * @param name name of the preference to set.
   * @param value value of the preference.
   */
  public void setGadgetPref(final String name, final String value) {
    ScheduleCommand.addCommand(new Task() {
      @Override
      public void execute() {
        if (isActive()) {
          sendGadgetPrefRpc(getGadgetName(), name, value);
        }
View Full Code Here

    deltaState.fromJsonObject(delta);
    // Defer state modifications to avoid RPC failure in Safari 3. The
    // intermittent failure is caused by RPC called from received RPC
    // callback.
    // TODO(user): Remove this workaround once this is fixed in GGS.
    ScheduleCommand.addCommand(new Task() {
      @Override
      public void execute() {
        deltaState.each(new Each() {
          @Override
          public void apply(final String key, final String value) {
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public boolean onKeySignal(final Widget sender, SignalEvent event) {
    // Deferred command so we have a look at the content after it's updated
    ScheduleCommand.addCommand(new Task() {
      public void execute() {
         if (sender == editor1) {
           outputEditorState(editor1, prettyContent1, prettyHtml1);
         } else {
           outputEditorState(editor2, prettyContent2, prettyHtml2);
View Full Code Here

    boolean shouldShowDebug =
        Window.Location.getParameter("debug") != null;
    menu.setVisible(shouldShowDebug);

    menu.addItem("OOPHM", navigateTaskOophm(Window.Location.getHref(), false));
    menu.addItem("Show log", new Task() {
        @Override public void execute() {
          Walkaround.ensureDomLog();
        }
      });
    menu.addItem("log level 'debug'", navigateTask(
        Window.Location.getHref() + "&ll=debug", false));
    menu.addItem("Frame: " + Window.Location.getHref(),
        navigateTask(Window.Location.getHref(), true));
    menu.addItem("Throw Exception", new Task() {
        @Override public void execute() {
          throw new RuntimeException("TEST EXCEPTION", a());
        }

        private Exception a() {
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.client.scheduler.Scheduler.Task

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.