org.argoprint.ui
Class Executor

java.lang.Object
  extended by org.argoprint.ui.Executor

public class Executor
extends java.lang.Object

This class is responsible for executing a list of tasks (classes which implement the Executable interface).

Author:
mfortner

Constructor Summary
Executor()
          Constructor
Executor(java.awt.Component parent, java.lang.String successMsg, java.lang.String failMsg, java.lang.String failTitle)
           
Executor(int initThreadPoolSize, int maxThreadPoolSize, int maxQueueSize)
          Constructor
 
Method Summary
 void addExecutable(Executable exec)
          Adds an executable to the list.
 java.lang.String collectExceptionMsgs()
          Aggregates all of the exception messages into a single message in order to display the exception messages.
 void execAll()
          This method executes all of the executables currently within its list.
 java.util.List<java.lang.Throwable> getExceptionList()
          Gets a list of exceptions that have occurred.
 boolean hasExceptions()
          Indicates whether or not any of the tasks have had exceptions.
 void setExecutableList(java.util.List<Executable> execList)
          Sets the list of executables.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Executor

public Executor()
Constructor


Executor

public Executor(int initThreadPoolSize,
                int maxThreadPoolSize,
                int maxQueueSize)
Constructor

Parameters:
initThreadPoolSize -
maxThreadPoolSize -
maxQueueSize -

Executor

public Executor(java.awt.Component parent,
                java.lang.String successMsg,
                java.lang.String failMsg,
                java.lang.String failTitle)
Method Detail

addExecutable

public void addExecutable(Executable exec)
Adds an executable to the list.

Parameters:
exec -

setExecutableList

public void setExecutableList(java.util.List<Executable> execList)
Sets the list of executables.

Parameters:
execList - Executable list.

hasExceptions

public boolean hasExceptions()
Indicates whether or not any of the tasks have had exceptions.

Returns:

getExceptionList

public java.util.List<java.lang.Throwable> getExceptionList()
Gets a list of exceptions that have occurred.

Returns:

execAll

public void execAll()
This method executes all of the executables currently within its list.


collectExceptionMsgs

public java.lang.String collectExceptionMsgs()
Aggregates all of the exception messages into a single message in order to display the exception messages.

Returns: