Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Stop readBar job
 Post subject: Stop readBar job Post rating: 0   New post Posted: Wed 10 Feb, 2010, 14:28 

User rating: 0
Joined: Wed 10 Feb, 2010, 14:09
Posts: 8
With reference to:
com.dukascopy.api.IHistory.readBars(Instrument instrument, Period period, OfferSide side, long from, long to, LoadingDataListener barListener, LoadingProgressListener loadingProgress) 


How can I cancel the job before it completes - say it was taking too long?


 
 Post subject: Re: Stop readBar job Post rating: 0   New post Posted: Mon 15 Feb, 2010, 11:23 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Use a LoadingProgressListener, which have the function 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.


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com