de.unikassel.android.sdcframework.devices
Class SampleTakingTask

Package class diagram package SampleTakingTask
java.lang.Object
  extended by de.unikassel.android.sdcframework.devices.SampleTakingTask
All Implemented Interfaces:
Runnable

public final class SampleTakingTask
extends Object
implements Runnable

This class does implement a runnable task to be executed delayed by an OS handler in the service context.

Every time this runnable is executed, it will post itself for another delayed execution using the current configured frequency. Further more, each time it is executed the linked scanner is invoked to take a sample from its associated device.

See Also:
SampleTakingDeviceScanner

Field Summary
private  Handler handler
          The handler to repost the task to for delayed runnable execution
private  SampleTakingDeviceScanner scanner
          The scanner taking the samples on runnable execution
 
Constructor Summary
SampleTakingTask(SampleTakingDeviceScanner scanner, Handler handler)
          Constructor
 
Method Summary
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

scanner

private final SampleTakingDeviceScanner scanner
The scanner taking the samples on runnable execution


handler

private final Handler handler
The handler to repost the task to for delayed runnable execution

Constructor Detail

SampleTakingTask

public SampleTakingTask(SampleTakingDeviceScanner scanner,
                        Handler handler)
Constructor

Parameters:
scanner - the scanner taking the samples on runnable execution
handler - the handler to repost the task to for delayed runnable execution
Method Detail

run

public final void run()
Specified by:
run in interface Runnable