I am using threads in blackberry to perform web service calls. I want to get notified as soon as the call gets a response back. I was using
Handlers
in android. I didnt find anything similar in blackberry.
Here is the code I am using to run the thread
class PrimeRun implements Runnable {
long minPrime;
PrimeRun(long minPrime) {
this.minPrime = minPrime;
}
public void run() {
// compute primes larger than minPrime
. . .
}
}
How can I get a notification after the thread finished running? How can I do this in blackberry? Thanks
Added more Information : Thanks for your reply. Its really informative. Let me explain a bit more on my issue. I have a webservice call which is running on a thread. As soon as I get the reply back from server I want to execute the next function(next call to server) which is based on the response from the previous call.So I need to wait until I get a response back. Also at them same time I need to show a activity indicator on screen. I was using handler for this in android. I am looking for something similar on blackberry.