org.jaitools.jiffle.runtime
Interface JiffleProgressListener

All Known Implementing Classes:
AbstractProgressListener, NullProgressListener

public interface JiffleProgressListener

An interface implemented by classes wishing to receive task progress information from a JiffleExecutor.

At run-time, the executor passes the progress listener to the JiffleRuntime object and it is the this object that updates the listener in its JiffleDirectRuntime.evaluateAll(org.jaitools.jiffle.runtime.JiffleProgressListener) method.

Since:
0.1
Version:
$Id: JiffleProgressListener.java 1653 2011-06-16 10:23:02Z michael.bedward $
Author:
Michael Bedward

Method Summary
 void finish()
          Called by the runtime object when the task finishes.
 long getUpdateInterval()
          Called by the runtime object before processing begins to get the update interval as number of destination image pixels.
 void setTaskSize(long numPixels)
          Called by the runtime object to inform the listener of the total number of pixels in the largest destination image that will be processed.
 void setUpdateInterval(double propPixels)
          Called by the client to request that the listener be notified of task progress after each propPixels proportion of the destination pixels has been processed by the runtime object.
 void setUpdateInterval(long numPixels)
          Called by the client to request that the listener be notified of task progress after each numPixels number of destination pixels have been processed by the runtime object.
 void start()
          Called by the runtime object when the task starts.
 void update(long done)
          Called by the runtime object at update intervals as specified by either setUpdateInterval(long) or setUpdateInterval(double).
 

Method Detail

setUpdateInterval

void setUpdateInterval(long numPixels)
Called by the client to request that the listener be notified of task progress after each numPixels number of destination pixels have been processed by the runtime object.

Parameters:
numPixels - number of pixels between listener updates

setUpdateInterval

void setUpdateInterval(double propPixels)
Called by the client to request that the listener be notified of task progress after each propPixels proportion of the destination pixels has been processed by the runtime object.

Parameters:
propPixels - proportion of pixels between listener updates

getUpdateInterval

long getUpdateInterval()
Called by the runtime object before processing begins to get the update interval as number of destination image pixels.

Returns:
update interval as number of pixels

setTaskSize

void setTaskSize(long numPixels)
Called by the runtime object to inform the listener of the total number of pixels in the largest destination image that will be processed.

Parameters:
numPixels - number of destination image pixels

start

void start()
Called by the runtime object when the task starts.


update

void update(long done)
Called by the runtime object at update intervals as specified by either setUpdateInterval(long) or setUpdateInterval(double).

It is important to keep the amount of processing done in this method to a minimum.

Parameters:
done - number of pixels processed

finish

void finish()
Called by the runtime object when the task finishes.



Copyright © 2011. All Rights Reserved.