com.dukascopy.api
Interface LoadingProgressListener


public interface LoadingProgressListener

Listener to follow and control (cancel) loading progress

Author:
Dmitry Shohov

Method Summary
 void dataLoaded(long startTime, long endTime, long currentTime, String information)
          Called on some random periods when new data arrives from curves server
 void loadingFinished(boolean allDataLoaded, long startTime, long endTime, long currentTime)
          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 should be called to check if job we doing is still actual for caller.
 

Method Detail

dataLoaded

void dataLoaded(long startTime,
                long endTime,
                long currentTime,
                String information)
Called on some random periods when new data arrives from curves server

Parameters:
startTime - time used as start point to load data, usually specified in loadData methods
endTime - time used as end point to load data, usually specified in loadData methods or if it's
currentTime - last loaded data time
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 startTime,
                     long endTime,
                     long currentTime)
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
startTime - time used as start point to load data, usually specified in loadData methods
endTime - time used as end point to load data, usually specified in loadData methods or if it's
currentTime - last loaded data time

stopJob

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

Returns:
true if job should be stopped


Copyright © 2009. All Rights Reserved.