org.argoprint.ui
Class AbstractExecutable

java.lang.Object
  extended by org.argoprint.ui.AbstractExecutable
All Implemented Interfaces:
java.lang.Runnable, Executable

public abstract class AbstractExecutable
extends java.lang.Object
implements Executable

Default implementation of an Executable.s

Author:
mfortner

Constructor Summary
AbstractExecutable()
           
 
Method Summary
 java.lang.Throwable getException()
          This method gets the exception that was thrown by the Executable.
 java.lang.String getName()
          Gets the name of the executable
 boolean hasException()
          Indicates that the thread threw an exception while running.
abstract  void run()
           
 void setException(java.lang.Throwable ex)
          Sets the exception thrown during execution.
 void setName(java.lang.String name)
          Sets the name of the executable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractExecutable

public AbstractExecutable()
Method Detail

run

public abstract void run()
Specified by:
run in interface java.lang.Runnable

getException

public java.lang.Throwable getException()
Description copied from interface: Executable
This method gets the exception that was thrown by the Executable.

Specified by:
getException in interface Executable
Returns:

hasException

public boolean hasException()
Description copied from interface: Executable
Indicates that the thread threw an exception while running.

Specified by:
hasException in interface Executable
Returns:
true if an exception has been thrown and the exception variable is set.

setException

public void setException(java.lang.Throwable ex)
Sets the exception thrown during execution.

Specified by:
setException in interface Executable
Parameters:
ex - The new exception

getName

public java.lang.String getName()
Description copied from interface: Executable
Gets the name of the executable

Specified by:
getName in interface Executable
Returns:
the name of the executable

setName

public void setName(java.lang.String name)
Description copied from interface: Executable
Sets the name of the executable

Specified by:
setName in interface Executable
Parameters:
name - the name of the executable