com.dukascopy.api
Interface LoadingProgressListener


public interface LoadingProgressListener

Listener to follow and control (cancel) loading progress


Method Summary
 void dataLoaded(long start, long end, long currentPosition, String information)
          Called on some random periods when new data arrives from curves server
 void loadingFinished(boolean allDataLoaded, long start, long end, long currentPosition)
          Called when data loading finished for some reason, it can be because all requested data loaded or because of some failure
 boolean stopJob()
          This method will be called to check if the job we are doing is still actual for the caller.
 

Method Detail

dataLoaded

void dataLoaded(long start,
                long end,
                long currentPosition,
                String information)
Called on some random periods when new data arrives from curves server

Parameters:
start - start point used for progress tracking
end - end point used for progress tracking
currentPosition - current position used for progress tracking
information - information which can be used as details for data loading. Can vary from simple "Loading..." to something more informative like "Loading data for period from 12.02.2007 to 13.02.2007..."

loadingFinished

void loadingFinished(boolean allDataLoaded,
                     long start,
                     long end,
                     long currentPosition)
Called when data loading finished for some reason, it can be because all requested data loaded or because of some failure

Parameters:
allDataLoaded - true if all requested data loaded, false if loading finished as a result of failure
start - start point used for progress tracking
end - end point used for progress tracking
currentPosition - current position used for progress tracking

stopJob

boolean stopJob()
This method will be called to check if the job we are doing is still actual for the caller. If method returns true than job will be stopped

Returns:
true if the job must be stopped


Copyright © 2011. All Rights Reserved.