com.google.gwt.core.client.testing

## Class StubScheduler

- java.lang.Object
- - com.google.gwt.core.client.Scheduler
  - - com.google.gwt.core.client.testing.StubScheduler

-     public class StubScheduler
      extends Scheduler

  A no-op implementation of Scheduler that simply records its arguments.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.google.gwt.core.client.Scheduler

      `Scheduler.RepeatingCommand, Scheduler.ScheduledCommand`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StubScheduler()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<Scheduler.RepeatingCommand>` | `getRepeatingCommands()` Returns the RepeatingCommands that have been passed into the MockScheduler.
    `java.util.List<Scheduler.ScheduledCommand>` | `getScheduledCommands()` Returns the ScheduledCommands that have been passed into the MockScheduler.
    `void` | `scheduleDeferred(Scheduler.ScheduledCommand cmd)` A deferred command is executed after the browser event loop returns.
    `void` | `scheduleEntry(Scheduler.RepeatingCommand cmd)` An "entry" command will be executed before GWT-generated code is invoked by the browser's event loop.
    `void` | `scheduleEntry(Scheduler.ScheduledCommand cmd)` An "entry" command will be executed before GWT-generated code is invoked by the browser's event loop.
    `void` | `scheduleFinally(Scheduler.RepeatingCommand cmd)` A "finally" command will be executed before GWT-generated code returns control to the browser's event loop.
    `void` | `scheduleFinally(Scheduler.ScheduledCommand cmd)` A "finally" command will be executed before GWT-generated code returns control to the browser's event loop.
    `void` | `scheduleFixedDelay(Scheduler.RepeatingCommand cmd, int delayMs)` Schedules a repeating command that is scheduled with a constant delay.
    `void` | `scheduleFixedPeriod(Scheduler.RepeatingCommand cmd, int delayMs)` Schedules a repeating command that is scheduled with a constant periodicity.
    `void` | `scheduleIncremental(Scheduler.RepeatingCommand cmd)` Schedules a repeating command that performs incremental work.

    - ### Methods inherited from class com.google.gwt.core.client.Scheduler

      `get`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StubScheduler

          public StubScheduler()

  - ### Method Detail

    - #### getRepeatingCommands

          public java.util.List<Scheduler.RepeatingCommand> getRepeatingCommands()

      Returns the RepeatingCommands that have been passed into the MockScheduler.

    - #### getScheduledCommands

          public java.util.List<Scheduler.ScheduledCommand> getScheduledCommands()

      Returns the ScheduledCommands that have been passed into the MockScheduler.

    - #### scheduleDeferred

          public void scheduleDeferred(Scheduler.ScheduledCommand cmd)

      Description copied from class: `Scheduler`
      A deferred command is executed after the browser event loop returns.
      Specified by:
        `scheduleDeferred` in class `Scheduler`

    - #### scheduleEntry

          public void scheduleEntry(Scheduler.RepeatingCommand cmd)

      Description copied from class: `Scheduler`
      An "entry" command will be executed before GWT-generated code is invoked by the browser's event loop. The `Scheduler.RepeatingCommand` will be called once per entry from the event loop until `false` is returned. This type of command is appropriate for instrumentation or code that needs to know when "something happens."

      If an entry command schedules another entry command, the second command will be executed before control flow continues to the GWT-generated code.

      Specified by:
        `scheduleEntry` in class `Scheduler`

    - #### scheduleEntry

          public void scheduleEntry(Scheduler.ScheduledCommand cmd)

      Description copied from class: `Scheduler`
      An "entry" command will be executed before GWT-generated code is invoked by the browser's event loop. This type of command is appropriate for code that needs to know when "something happens."

      If an entry command schedules another entry command, the second command will be executed before control flow continues to the GWT-generated code.

      Specified by:
        `scheduleEntry` in class `Scheduler`

    - #### scheduleFinally

          public void scheduleFinally(Scheduler.RepeatingCommand cmd)

      Description copied from class: `Scheduler`
      A "finally" command will be executed before GWT-generated code returns control to the browser's event loop. The `Scheduler.RepeatingCommand.execute()` method will be called once per exit to the event loop until `false` is returned. This type of command is appropriate for instrumentation or cleanup code.

      If a finally command schedules another finally command, the second command will be executed before control flow returns to the browser.

      Specified by:
        `scheduleFinally` in class `Scheduler`

    - #### scheduleFinally

          public void scheduleFinally(Scheduler.ScheduledCommand cmd)

      Description copied from class: `Scheduler`
      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.

      If a finally command schedules another finally command, the second command will be executed before control flow returns to the browser.

      Consider the following:

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

      Specified by:
        `scheduleFinally` in class `Scheduler`
      See Also:
        `StyleInjector`

    - #### scheduleFixedDelay

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

      Description copied from class: `Scheduler`
      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.

      Specified by:
        `scheduleFixedDelay` in class `Scheduler`
      Parameters:
        `cmd` - the command to execute
        `delayMs` - the amount of time to wait after one invocation ends before the next invocation

    - #### scheduleFixedPeriod

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

      Description copied from class: `Scheduler`
      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.
      Specified by:
        `scheduleFixedPeriod` in class `Scheduler`
      Parameters:
        `cmd` - the command to execute
        `delayMs` - the period with which the command is executed

    - #### scheduleIncremental

          public void scheduleIncremental(Scheduler.RepeatingCommand cmd)

      Description copied from class: `Scheduler`
      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.
      Specified by:
        `scheduleIncremental` in class `Scheduler`
      Parameters:
        `cmd` - the command to execute