com.funambol.client.engine
Class Poller

java.lang.Object
  extended by java.lang.Thread
      extended by com.funambol.client.engine.Poller
All Implemented Interfaces:
java.lang.Runnable

public class Poller
extends java.lang.Thread

This class can be used to trigger sync requests at periodic intervals. The poller can be enabled/disabled dynamically. SyncRequests are invoked via the SynchronizationController which is passed in the costructor. By default this class invokes a sync for all the sources that are part of the sync all group and are enabled, but the set can be restricted by specifying a different subset. The Poller can be used in 2 different cases: 1) to trigger scheduled syncs (for the enabled sources) 2) to trigger retry syncs on errors for which a retry attempt must be performed The parameter handleTimestamp tells if this Poller should handle the timestamp (set into the Configuration) within which the Poller shall be triggered.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Poller(SynchronizationController ctrl, int interval, boolean enabled, boolean handleTimestamp)
           
 
Method Summary
 void disable()
           
 void enable()
           
 int getInterval()
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Poller

public Poller(SynchronizationController ctrl,
              int interval,
              boolean enabled,
              boolean handleTimestamp)
Method Detail

disable

public void disable()

enable

public void enable()

getInterval

public int getInterval()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread


Copyright © 2001-2009 Funambol.