org.bibalex.daf.managers.phase
Class ProgressDialog.JobStateStarter

java.lang.Object
  extended by java.lang.Thread
      extended by org.bibalex.daf.managers.phase.ProgressDialog.JobStateStarter
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ProgressDialog

private class ProgressDialog.JobStateStarter
extends java.lang.Thread

Starts a ceratin JobState by applying its actions.

Author:
Shehab.Kamal

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  java.lang.String errorMessage
           
private  boolean result
           
private  JobState state
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ProgressDialog.JobStateStarter(JobState state)
          Creates a new JobStateStarter.
 
Method Summary
 java.lang.String getErrorMessage()
          Gets the error message to be displayed to the user .
Note: This method must be called after the thread finishes its job.
 boolean getResult()
          Gets the result of applying the state actions.
Note: This method must be called after the thread finishes its job.
 void run()
          Applies the state actions.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

state

private JobState state

result

private boolean result

errorMessage

private java.lang.String errorMessage
Constructor Detail

ProgressDialog.JobStateStarter

public ProgressDialog.JobStateStarter(JobState state)
Creates a new JobStateStarter.

Parameters:
state - The JobState to start.
Method Detail

run

public void run()
Applies the state actions.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

getResult

public boolean getResult()
Gets the result of applying the state actions.
Note: This method must be called after the thread finishes its job.

Returns:
The result of applying the state actions

getErrorMessage

public java.lang.String getErrorMessage()
Gets the error message to be displayed to the user .
Note: This method must be called after the thread finishes its job.

Returns:
The result of applying the state actions