org.progeeks.cmd.swing
Class SwingCommandProcessor

java.lang.Object
  extended by org.progeeks.cmd.swing.SwingCommandProcessor
All Implemented Interfaces:
CommandProcessor, Environment

public class SwingCommandProcessor
extends java.lang.Object
implements CommandProcessor, Environment

A command processor implementation that supports commands targetted to the AWT event thread or a set of background threads.

Version:
$Revision: 1.4 $
Author:
Paul Speed

Constructor Summary
SwingCommandProcessor()
          Creates a new command processor implementation that can execute commands that are coordinated with the swing thread.
 
Method Summary
 Result execute(Command cmd)
          Executes the specified command using the ViewEnvironment implementation.
 Result execute(Command cmd, boolean wait)
          Executes the specified command using the ViewEnvironment implementation.
protected  Result executeViewCommand(ViewCommand cmd, boolean wait)
          Internal command used to process view command implementations.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SwingCommandProcessor

public SwingCommandProcessor()
Creates a new command processor implementation that can execute commands that are coordinated with the swing thread.

Method Detail

execute

public Result execute(Command cmd)
Executes the specified command using the ViewEnvironment implementation. This version of execute will run the command synchronously.

Specified by:
execute in interface CommandProcessor
Parameters:
cmd - The command to invoke.
Returns:
A result container or null if the command returns no result.

execute

public Result execute(Command cmd,
                      boolean wait)
Executes the specified command using the ViewEnvironment implementation. The command will be run synchronously if the wait flag is set.

Parameters:
cmd - The command to invoke.
wait - If true, the command will be run synchronously.
Returns:
A result container or null if the command returns no result.

executeViewCommand

protected Result executeViewCommand(ViewCommand cmd,
                                    boolean wait)
Internal command used to process view command implementations.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.