com.izforge.izpack.installer
Class ProcessPanelWorker

java.lang.Object
  extended by com.izforge.izpack.installer.ProcessPanelWorker
All Implemented Interfaces:
java.lang.Runnable

public class ProcessPanelWorker
extends java.lang.Object
implements java.lang.Runnable

This class does alle the work for the process panel.

It responsible for

Author:
Tino Schwarze

Nested Class Summary
private static class ProcessPanelWorker.ExecutableClass
          Tries to create a class that has an empty contstructor and a method run(AbstractUIProcessHandler, String[]) If found, it calls the method and processes all returned exceptions
private static class ProcessPanelWorker.ExecutableFile
           
(package private) static interface ProcessPanelWorker.Processable
           
private static class ProcessPanelWorker.ProcessingJob
           
 
Field Summary
protected  AbstractUIProcessHandler handler
           
protected  AutomatedInstallData idata
           
private  java.util.ArrayList<ProcessPanelWorker.ProcessingJob> jobs
           
private static java.io.PrintWriter logfile
           
private  java.lang.String logfiledir
           
private  boolean result
           
private static java.lang.String SPEC_RESOURCE_NAME
          Name of resource for specifying processing parameters.
private  VariableSubstitutor vs
           
 
Constructor Summary
ProcessPanelWorker(AutomatedInstallData idata, AbstractUIProcessHandler handler)
          The constructor.
 
Method Summary
 boolean getResult()
          Return the result of the process execution.
private  boolean jobRequiredFor(java.util.Vector<XMLElement> packs)
           
private  boolean readSpec()
           
 void run()
          This is called when the processing thread is activated.
 void startThread()
          Start the compilation in a separate thread.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPEC_RESOURCE_NAME

private static final java.lang.String SPEC_RESOURCE_NAME
Name of resource for specifying processing parameters.

See Also:
Constant Field Values

vs

private VariableSubstitutor vs

handler

protected AbstractUIProcessHandler handler

jobs

private java.util.ArrayList<ProcessPanelWorker.ProcessingJob> jobs

result

private boolean result

logfile

private static java.io.PrintWriter logfile

logfiledir

private java.lang.String logfiledir

idata

protected AutomatedInstallData idata
Constructor Detail

ProcessPanelWorker

public ProcessPanelWorker(AutomatedInstallData idata,
                          AbstractUIProcessHandler handler)
                   throws java.io.IOException
The constructor.

Parameters:
idata - The installation data.
handler - The handler to notify of progress.
Throws:
java.io.IOException
Method Detail

readSpec

private boolean readSpec()
                  throws java.io.IOException
Throws:
java.io.IOException

run

public void run()
This is called when the processing thread is activated.

Can also be called directly if asynchronous processing is not desired.

Specified by:
run in interface java.lang.Runnable

startThread

public void startThread()
Start the compilation in a separate thread.


getResult

public boolean getResult()
Return the result of the process execution.

Returns:
true if all processes succeeded, false otherwise.

jobRequiredFor

private boolean jobRequiredFor(java.util.Vector<XMLElement> packs)