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

java.lang.Object
  extended by org.fuin.apps4swing.AbstractControllerQueue<CONTROLLER,VIEW>
Type Parameters:
CONTROLLER - Type of the controller.
VIEW - Type of the view.
All Implemented Interfaces:
org.fuin.apps4j.base.Controller<VIEW>, org.fuin.apps4j.base.ModuleImplIntf

public abstract class AbstractControllerQueue<CONTROLLER,VIEW>
extends Object
implements org.fuin.apps4j.base.Controller<VIEW>, org.fuin.apps4j.base.ModuleImplIntf

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


Constructor Summary
AbstractControllerQueue()
          Default constructor.
 
Method Summary
protected  Object execute(Callable<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
 
Methods inherited from interface org.fuin.apps4j.base.Controller
getControllerUI
 
Methods inherited from interface org.fuin.apps4j.base.ModuleImplIntf
cancel, getModuleUI, getName
 

Constructor Detail

AbstractControllerQueue

public AbstractControllerQueue()
Default constructor.

Method Detail

execute

protected final Object execute(Callable<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 © 2011 Future Invent Informationsmanagement GmbH. All Rights Reserved.