org.fuin.apps4swing
Class ControllerQueue<CONTROLLER,VIEW>

java.lang.Object
  extended by org.fuin.apps4swing.ControllerQueue<CONTROLLER,VIEW>
Type Parameters:
CONTROLLER - Type of the controller.
VIEW - Type of the view.

public abstract class ControllerQueue<CONTROLLER,VIEW>
extends java.lang.Object

Queues commands for the controller and executes them in sequential order.


Constructor Summary
ControllerQueue()
          Default constructor.
 
Method Summary
protected  java.lang.Object execute(java.util.concurrent.Callable<java.lang.Object> callable)
          Executes a task and returns the result of the command.
 CONTROLLER getController()
          Returns the controller that contains the real application logic.
 void setController(CONTROLLER ctrl)
          Sets the controller that contains the real application logic.
 void setControllerTaskExecutor(ControllerTaskExecutor<CONTROLLER> ctrlTaskExecutor)
          Sets the executor that actually does the work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerQueue

public ControllerQueue()
Default constructor.

Method Detail

execute

protected final java.lang.Object execute(java.util.concurrent.Callable<java.lang.Object> callable)
Executes a task and returns the result of the command.

Parameters:
callable - Task to execute.
Returns:
Result of the operation.

setControllerTaskExecutor

public final void setControllerTaskExecutor(ControllerTaskExecutor<CONTROLLER> ctrlTaskExecutor)
Sets the executor that actually does the work.

Parameters:
ctrlTaskExecutor - Task executor to set.

getController

public final CONTROLLER getController()
Returns the controller that contains the real application logic.

Returns:
Controller or null.

setController

public final void setController(CONTROLLER ctrl)
Sets the controller that contains the real application logic.

Parameters:
ctrl - Controller to set or null.


Copyright © 2010 Future Invent Informationsmanagement GmbH. All Rights Reserved.