Package com.google.gwt.user.client
Class DeferredCommand
- java.lang.Object
-
- com.google.gwt.user.client.DeferredCommand
-
@Deprecated public class DeferredCommand extends java.lang.ObjectDeprecated.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 voidadd(Command cmd)Deprecated.As of release 1.4, replaced byaddCommand(Command)static voidaddCommand(Command cmd)Deprecated.Enqueues aCommandto be fired after all current events have been handled.static voidaddCommand(IncrementalCommand cmd)Deprecated.Enqueues anIncrementalCommandto be fired after all current events have been handled.static voidaddPause()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 aCommandto 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 aCommandto be fired after all current events have been handled. Note that theCommandshould 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 anIncrementalCommandto be fired after all current events have been handled. Note that theIncrementalCommandshould 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 ofDeferredCommands. AnyDeferredCommands or pauses that are added after this pause will wait for an additional cycle through the system event loop before executing.
-
-