Dali Provisional API
Release 3.2

org.eclipse.jpt.common.utility.command
Class ExtendedCommandExecutor.Default

java.lang.Object
  extended by org.eclipse.jpt.common.utility.command.ExtendedCommandExecutor.Default
All Implemented Interfaces:
Serializable, CommandExecutor, ExtendedCommandExecutor
Enclosing interface:
ExtendedCommandExecutor

public static final class ExtendedCommandExecutor.Default
extends Object
implements ExtendedCommandExecutor, Serializable

Singleton implementation of the command executor interface that simply executes the command without any sort of enhancement.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.jpt.common.utility.command.ExtendedCommandExecutor
ExtendedCommandExecutor.Default, ExtendedCommandExecutor.Inactive
 
Field Summary
static ExtendedCommandExecutor INSTANCE
           
 
Method Summary
 void execute(Command command)
          Execute the specified command, synchronously or asynchronously.
static ExtendedCommandExecutor instance()
           
 String toString()
           
 void waitToExecute(Command command)
          Suspend the current thread until the specified command is executed.
 boolean waitToExecute(Command command, long timeout)
          Suspend the current thread until the specified command is executed or the specified time-out occurs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static final ExtendedCommandExecutor INSTANCE
Method Detail

instance

public static ExtendedCommandExecutor instance()

execute

public void execute(Command command)
Description copied from interface: CommandExecutor
Execute the specified command, synchronously or asynchronously. The commands themselves must be executed in the order in which they are passed to the command executor (at least when passed from clients executing on the same thread).

Specified by:
execute in interface CommandExecutor

waitToExecute

public void waitToExecute(Command command)
Description copied from interface: ExtendedCommandExecutor
Suspend the current thread until the specified command is executed. The command itself must be executed after any other commands previously passed to the command executor (at least when passed from clients executing on the same thread).

Specified by:
waitToExecute in interface ExtendedCommandExecutor
See Also:
CommandExecutor.execute(Command)

waitToExecute

public boolean waitToExecute(Command command,
                             long timeout)
Description copied from interface: ExtendedCommandExecutor
Suspend the current thread until the specified command is executed or the specified time-out occurs. The time-out is specified in milliseconds. Return true if the command was executed in the allotted time; return false if a time-out occurred and the command was not executed. If the time-out is zero, wait indefinitely.

The command itself must be executed after any other commands previously passed to the command executor (at least when passed from clients executing on the same thread).

Specified by:
waitToExecute in interface ExtendedCommandExecutor
See Also:
CommandExecutor.execute(Command)

toString

public String toString()
Overrides:
toString in class Object

Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.