Package com.google.gwt.user.client
Class DeferredCommand
- java.lang.Object
-
- com.google.gwt.user.client.DeferredCommand
-
@Deprecated public class DeferredCommand extends java.lang.Object
Deprecated.Replaced byScheduler.scheduleDeferred()
because the static nature of this API prevents effective mocking for JRE-only tests.This class allows you to execute code after all currently pending event handlers have completed, using theaddCommand(Command)
oraddCommand(IncrementalCommand)
methods. This is useful when you need to execute code outside of the context of the current stack.
-
-
Constructor Summary
Constructors Constructor Description DeferredCommand()
Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
add(Command cmd)
Deprecated.As of release 1.4, replaced byaddCommand(Command)
static void
addCommand(Command cmd)
Deprecated.Enqueues aCommand
to be fired after all current events have been handled.static void
addCommand(IncrementalCommand cmd)
Deprecated.Enqueues anIncrementalCommand
to be fired after all current events have been handled.static void
addPause()
Deprecated.with no replacement because the presence of this method causes arbitrary scheduling decisions
-
-
-
Method Detail
-
add
@Deprecated public static void add(Command cmd)
Deprecated.As of release 1.4, replaced byaddCommand(Command)
Enqueues aCommand
to be fired after all current events have been handled.- Parameters:
cmd
- the command to be fired. If cmd is null, a "pause" will be inserted into the queue. Any events added after the pause will wait for an additional cycle through the system event loop before executing. Pauses are cumulative.
-
addCommand
public static void addCommand(Command cmd)
Deprecated.Enqueues aCommand
to be fired after all current events have been handled. Note that theCommand
should not perform any blocking operations.- Parameters:
cmd
- the command to be fired- Throws:
java.lang.NullPointerException
- if cmd isnull
-
addCommand
public static void addCommand(IncrementalCommand cmd)
Deprecated.Enqueues anIncrementalCommand
to be fired after all current events have been handled. Note that theIncrementalCommand
should not perform any blocking operations.- Parameters:
cmd
- the command to be fired- Throws:
java.lang.NullPointerException
- if cmd isnull
-
addPause
@Deprecated public static void addPause()
Deprecated.with no replacement because the presence of this method causes arbitrary scheduling decisionsAdds a "pause" to the queue ofDeferredCommand
s. AnyDeferredCommand
s or pauses that are added after this pause will wait for an additional cycle through the system event loop before executing.
-
-