org.argoprint.ui
Interface Executable

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
AbstractExecutable

public interface Executable
extends java.lang.Runnable

This class provides a means for threads to throw an exception which can later be caught. It is intended for use with ThreadPools other other constructs where one submits an executable and later wants to know which threads failed and why.

Author:
mfortner

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.
 void setException(java.lang.Throwable ex)
          Sets the exception thrown by the executable.
 void setName(java.lang.String name)
          Sets the name of the executable
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

getException

java.lang.Throwable getException()
This method gets the exception that was thrown by the Executable.

Returns:

setException

void setException(java.lang.Throwable ex)
Sets the exception thrown by the executable.

Parameters:
ex - The new exception.

hasException

boolean hasException()
Indicates that the thread threw an exception while running.

Returns:
true if an exception has been thrown and the exception variable is set.

getName

java.lang.String getName()
Gets the name of the executable

Returns:
the name of the executable

setName

void setName(java.lang.String name)
Sets the name of the executable

Parameters:
name - the name of the executable