|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.upb.swt.epctools.simulator.EPCComputationThread
public abstract class EPCComputationThread
| Nested Class Summary | |
|---|---|
class |
EPCComputationThread.CancelDialog
This class implements a SWT Dialog with a cancel button. |
class |
EPCComputationThread.NonExclusiveComputationThread
This class implements the thread mechanism but without a check whether an old thread is still running. |
| Field Summary | |
|---|---|
private boolean |
m_aborted
|
private static EPCComputationThread |
m_current_computation_thread
|
private java.lang.String |
m_dialog_title
|
private EPCComputationThread.NonExclusiveComputationThread |
m_ne_computation_thread
|
private static int |
m_running_computation_threads
|
private boolean |
m_use_thread_mechanism
|
| Constructor Summary | |
|---|---|
EPCComputationThread(java.lang.String dialog_title)
Constructor |
|
| Method Summary | |
|---|---|
void |
abortComputation()
This function is called when the cancel button has been pushed It should be implemented by the sub-class. |
static EPCComputationThread |
getCurrentComputationThread()
Returns the current computation thread. |
EPCComputationThread.CancelDialog |
getDialog()
|
boolean |
isAborted()
|
static boolean |
isThreadRunning()
|
boolean |
isUsed()
Returns true if the thread mechanism is used. |
abstract void |
performComputation()
This is the method that will run in a separated thread. |
void |
setDialogTitle(java.lang.String dialog_title)
|
abstract void |
startComputation()
This function should be implemented by the sub-class and should start a compuation using the overloaded startComputation(...) function. |
protected void |
startComputation(boolean in_a_thread)
This function starts the computation in a new thread verifying that no other instance is already running. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static EPCComputationThread m_current_computation_thread
private static int m_running_computation_threads
private EPCComputationThread.NonExclusiveComputationThread m_ne_computation_thread
private java.lang.String m_dialog_title
private boolean m_use_thread_mechanism
private boolean m_aborted
| Constructor Detail |
|---|
public EPCComputationThread(java.lang.String dialog_title)
| Method Detail |
|---|
public static EPCComputationThread getCurrentComputationThread()
public abstract void performComputation()
throws EPCComputationException
EPCComputationException
public abstract void startComputation()
throws EPCComputationException
EPCComputationExceptionpublic void abortComputation()
protected void startComputation(boolean in_a_thread)
throws EPCComputationException
EPCComputationExceptionpublic final EPCComputationThread.CancelDialog getDialog()
public final void setDialogTitle(java.lang.String dialog_title)
public final boolean isUsed()
public static boolean isThreadRunning()
public boolean isAborted()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||