unbbayes.util.longtask
Interface ILongTaskProgressObservable

All Known Subinterfaces:
IEvaluation, ILikelihoodWeightingSampling, IMonteCarloSampling
All Known Implementing Classes:
AEvaluation, AMonteCarloSampling, ExactEvaluation, FastLWApproximateEvaluation, FastMCApproximateEvaluation, LikelihoodWeightingSampling, MapMonteCarloSampling, MatrixMonteCarloSampling, MemoryEfficientApproximateEvaluation

public interface ILongTaskProgressObservable

Represents a long task that has its progress observable.

Author:
Laecio, Rommel Carvalho (rommel.carvalho@gmail.com)

Method Summary
 int getCurrentProgress()
          The current number of this long task progress.
 String getCurrentProgressStatus()
          Returns a message with a description of the current status of the long task progress.
 int getMaxProgress()
          The maximum number allowed for this long task progress.
 int getPercentageDone()
          Returns the percentage of the progress done so far.
 void notityObservers(LongTaskProgressChangedEvent event)
           
 void registerObserver(ILongTaskProgressObserver observer)
           
 void removeObserver(ILongTaskProgressObserver observer)
           
 

Method Detail

registerObserver

void registerObserver(ILongTaskProgressObserver observer)

removeObserver

void removeObserver(ILongTaskProgressObserver observer)

notityObservers

void notityObservers(LongTaskProgressChangedEvent event)

getMaxProgress

int getMaxProgress()
The maximum number allowed for this long task progress. It represents 100%.

Returns:
the maximum number allowed for this long task progress. It represents 100%.

getCurrentProgress

int getCurrentProgress()
The current number of this long task progress. It represents a percentage.

Returns:
the current number of this long task progress. It represents a percentage.

getPercentageDone

int getPercentageDone()
Returns the percentage of the progress done so far. It should be Math.round((float)currentProgress / maxProgress * 10000), a number between 0 and 10000.

Returns:
the percentage of the progress done so far.

getCurrentProgressStatus

String getCurrentProgressStatus()
Returns a message with a description of the current status of the long task progress.

Returns:
a message with a description of the current status of the long task progress.


Copyright © 2001-2010 University of Brasilia - UnB. All Rights Reserved.