com.sptci.echo2
Class Controller.Updater<S>

java.lang.Object
  extended by com.sptci.echo2.Controller.Updater<S>
All Implemented Interfaces:
Serializable, TaskQueueHandle
Enclosing class:
Controller<V>

public class Controller.Updater<S>
extends Object
implements TaskQueueHandle

An abstract updater task used to execute timed tasks in the background and push updates to the UI.

See Also:
Serialized Form

Nested Class Summary
(package private)  class Controller.Updater.Executor
          The runnable that is used to execute method on source when executed the application service.
 
Field Summary
protected  String method
          The name of the Method that is to be invoked on source.
protected  int pollingInterval
          The polling interval at which client must poll server for updates.
protected  S source
          The source object which contains the method that is to be invoked each time this task is executed.
 
Constructor Summary
Controller.Updater(int pollingInterval, S source, String method)
          Create a new instance of the worker with the specified values.
 
Method Summary
protected  void setMethod(String method)
          Set method.
protected  void setPollingInterval(int pollingInterval)
          Set pollingInterval.
protected  void setSource(S source)
          Set source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pollingInterval

protected int pollingInterval
The polling interval at which client must poll server for updates.


source

protected S source
The source object which contains the method that is to be invoked each time this task is executed.


method

protected String method
The name of the Method that is to be invoked on source.

Constructor Detail

Controller.Updater

public Controller.Updater(int pollingInterval,
                          S source,
                          String method)
Create a new instance of the worker with the specified values.

Parameters:
pollingInterval - The pollingInterval to set.
source - The source to set.
method - The method to set.
Method Detail

setPollingInterval

protected void setPollingInterval(int pollingInterval)
Set pollingInterval.

Parameters:
pollingInterval - The value to set.

setSource

protected void setSource(S source)
Set source.

Parameters:
source - The value to set.

setMethod

protected void setMethod(String method)
Set method.

Parameters:
method - The value to set.