class CommandExecutor
extends java.lang.Object
Commands and IncrementalCommands after
 all currently pending event handlers have completed. This class attempts to
 protect against slow script warnings by running commands in small time
 increments.
 
 It is still possible that a poorly written command could cause a slow script
 warning which a user may choose to cancel. In that event, a
 CommandCanceledException or an
 IncrementalCommandCanceledException is reported through
 GWT#reportUncaughtException depending on the type of command which
 caused the warning. All other commands will continue to be executed.
 
Command or an IncrementalCommand calls either
 Window.alert(String) or the JavaScript alert(String)
 methods directly or indirectly then the  cancellation timer can fire,
 resulting in a false SSW cancellation detection.| Constructor and Description | 
|---|
| CommandExecutor() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | doCommandCanceled()Removes the command from the queue and throws either a
  CommandCanceledExceptionor anIncrementalCommandCanceledExceptiondepending on type of the
 command. | 
| protected void | doExecuteCommands(double startTimeMillis)This method will dispatch commands from the command queue. | 
| (package private) java.util.List<java.lang.Object> | getPendingCommands()This method is for testing only. | 
| protected void | maybeStartExecutionTimer()Starts the dispatch timer if there are commands to dispatch and we are not
 waiting for a dispatch timer and we are not actively dispatching. | 
| (package private) void | setExecuting(boolean executing)This method is for testing only. | 
| (package private) void | setLast(int last)This method is for testing only. | 
| void | submit(Command command)Submits a  Commandfor execution. | 
| void | submit(IncrementalCommand command)Submits an  IncrementalCommandfor execution. | 
public void submit(Command command)
Command for execution.command - command to submitpublic void submit(IncrementalCommand command)
IncrementalCommand for execution.command - command to submitprotected void doCommandCanceled()
CommandCanceledException or an
 IncrementalCommandCanceledException depending on type of the
 command.protected void doExecuteCommands(double startTimeMillis)
true:
 null in the command queuestartTimeMillis - the time when this method startedprotected void maybeStartExecutionTimer()
java.util.List<java.lang.Object> getPendingCommands()
void setExecuting(boolean executing)
void setLast(int last)