com.virtuosotechnologies.lib.asyncjob
Class AsyncJobProgressEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.virtuosotechnologies.lib.asyncjob.AsyncJobEvent
          extended bycom.virtuosotechnologies.lib.asyncjob.AsyncJobProgressEvent
All Implemented Interfaces:
Serializable

public class AsyncJobProgressEvent
extends AsyncJobEvent

An event sent to a listener when progress is updated

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AsyncJobProgressEvent(AsyncJobExecution execution, float fractionDone, String progressString)
          Constructor for events broadcast by the AsyncJobExecution.
AsyncJobProgressEvent(AsyncJobRunner runner, AsyncJob job, float fractionDone, String progressString)
          Constructor for events broadcast by the AsyncJobRunner.
 
Method Summary
 float getFractionDone()
          Get the fraction done.
 String getProgressString()
          Get the progress string.
 
Methods inherited from class com.virtuosotechnologies.lib.asyncjob.AsyncJobEvent
getAsyncJob, getAsyncJobExecution, getAsyncJobRunner
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsyncJobProgressEvent

public AsyncJobProgressEvent(AsyncJobRunner runner,
                             AsyncJob job,
                             float fractionDone,
                             String progressString)
Constructor for events broadcast by the AsyncJobRunner.

Parameters:
runner - AsyncJobRunner broadcasting the event
job - AsyncJob being run
fractionDone - fraction complete as a float between 0.0 and 1.0, or AsyncJob.INDETERMINATE_PROGRESS for interminate value
progressString - new progress string

AsyncJobProgressEvent

public AsyncJobProgressEvent(AsyncJobExecution execution,
                             float fractionDone,
                             String progressString)
Constructor for events broadcast by the AsyncJobExecution.

Parameters:
execution - AsyncJobExecution broadcasting the event
fractionDone - fraction complete as a float between 0.0 and 1.0, or AsyncJob.INDETERMINATE_PROGRESS for interminate value
progressString - new progress string
Method Detail

getFractionDone

public final float getFractionDone()
Get the fraction done.

Returns:
the fraction done as a float between 0 and 1, or the constant AsyncJob.INDETERMINATE_PROGRESS.

getProgressString

public final String getProgressString()
Get the progress string.

Returns:
the progress string. May be null.