org.fuin.apps4swing
Class ToControllerDispatcher<CTRL extends org.fuin.apps4j.Controller<VIEW>,VIEW>

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

public abstract class ToControllerDispatcher<CTRL extends org.fuin.apps4j.Controller<VIEW>,VIEW>
extends java.lang.Object

Dispatch events from the view to the controller using a new thread.


Constructor Summary
ToControllerDispatcher()
          Default constructor.
 
Method Summary
protected  void execute(java.lang.Runnable runnable)
          Execute the runnable in the controller's thread.
 CTRL getController()
          Returns the controller the dispatcher works on.
 void setController(CTRL controller)
          Sets the controller the dispatcher works on.
 void setExecutorService(java.util.concurrent.ExecutorService executor)
          Sets the executor service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToControllerDispatcher

public ToControllerDispatcher()
Default constructor.

Method Detail

execute

protected final void execute(java.lang.Runnable runnable)
Execute the runnable in the controller's thread.

Parameters:
runnable - Runnable to execute.

getController

public final CTRL getController()
Returns the controller the dispatcher works on.

Returns:
Controller.

setController

public final void setController(CTRL controller)
Sets the controller the dispatcher works on.

Parameters:
controller - Controller.

setExecutorService

public final void setExecutorService(java.util.concurrent.ExecutorService executor)
Sets the executor service.

Parameters:
executor - Executor to set.


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