Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.core.client
Class Scheduler

    java.lang.Object
      com.google.gwt.core.client.Scheduler

    public abstract class Scheduler

extends java.lang.Object

This class provides low-level task scheduling primitives. Any exceptions thrown by the command objects executed by the scheduler will be passed to the `GWT.UncaughtExceptionHandler` if one is installed.

Nested Class Summary
`static interface` | `Scheduler.RepeatingCommand` General-purpose Command interface for tasks that repeat.
`static interface` | `Scheduler.ScheduledCommand` General-purpose Command interface.

Constructor Summary
`Scheduler()`

Method Summary
`static Scheduler` | `get()` Returns the default implementation of the Scheduler API.
`abstract void` | `scheduleDeferred(Scheduler.ScheduledCommand cmd)` A deferred command is executed after the browser event loop returns.
`abstract void` | `scheduleFinally(Scheduler.ScheduledCommand cmd)` A "finally" command will be executed before GWT-generated code returns control to the browser's event loop.
`abstract void` | `scheduleFixedDelay(Scheduler.RepeatingCommand cmd, int delayMs)` Schedules a repeating command that is scheduled with a constant delay.
`abstract void` | `scheduleFixedPeriod(Scheduler.RepeatingCommand cmd, int delayMs)` Schedules a repeating command that is scheduled with a constant periodicity.
`abstract void` | `scheduleIncremental(Scheduler.RepeatingCommand cmd)` Schedules a repeating command that performs incremental work.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Scheduler

    public Scheduler()

Method Detail

### get

    public static Scheduler get()

  Returns the default implementation of the Scheduler API.

### scheduleDeferred

    public abstract void scheduleDeferred(Scheduler.ScheduledCommand cmd)

  A deferred command is executed after the browser event loop returns.

### scheduleFinally

    public abstract void scheduleFinally(Scheduler.ScheduledCommand cmd)

  A "finally" command will be executed before GWT-generated code returns control to the browser's event loop. This type of command is used to aggregate small amounts of work before performing a non-recurring, heavyweight operation.

  Consider the following:

       try {
         nativeEventCallback(); // Calls scheduleFinally one or more times
       } finally {
         executeFinallyCommands();
       }

  See Also:
    `StyleInjector`

### scheduleFixedDelay

    public abstract void scheduleFixedDelay(Scheduler.RepeatingCommand cmd,
                                            int delayMs)

  Schedules a repeating command that is scheduled with a constant delay. That is, the next invocation of the command will be scheduled for `delayMs` milliseconds after the last invocation completes.

  For example, assume that a command takes 30ms to run and a 100ms delay is provided. The second invocation of the command will occur at 130ms after the first invocation starts.

  Parameters:
    `cmd` - the command to execute
    `delayMs` - the amount of time to wait after one invocation ends before the next invocation

### scheduleFixedPeriod

    public abstract void scheduleFixedPeriod(Scheduler.RepeatingCommand cmd,
                                             int delayMs)

  Schedules a repeating command that is scheduled with a constant periodicity. That is, the command will be invoked every `delayMs` milliseconds, regardless of how long the previous invocation took to complete.

  Parameters:
    `cmd` - the command to execute
    `delayMs` - the period with which the command is executed

### scheduleIncremental

    public abstract void scheduleIncremental(Scheduler.RepeatingCommand cmd)

  Schedules a repeating command that performs incremental work. This type of command is encouraged for long-running processes that perform computation or that manipulate the DOM. The commands in this queue are invoked many times in rapid succession and are then deferred to allow the browser to process its event queue.

  Parameters:
    `cmd` - the command to execute

Overview | Package | Class | Tree | Deprecated | Index | Help
| GWT 2.0.3
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD