Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
private File |
absolute_installpath
The absolute path of the installation.
|
static String |
ALIVE |
private static boolean |
discardInterrupt
Do not perform a interrupt call.
|
private AbstractUIProgressHandler |
handler
The installer listener.
|
private AutomatedInstallData |
idata
The installdata.
|
private static HashMap |
instances
The instances of the unpacker objects.
|
static String |
INTERRUPT |
private static boolean |
interruptDesired
Interrupt flag if global interrupt is desired.
|
static String |
INTERRUPTED |
private static String |
LANG_FILE_NAME
The name of the XML file that specifies the panel langpack
|
private LocaleDatabase |
langpack
The packs locale database.
|
private UninstallData |
udata
The uninstallation data.
|
private VariableSubstitutor |
vs
The variables substitutor.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
Unpacker(AutomatedInstallData idata,
AbstractUIProgressHandler handler)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
addToInstances()
Adds this to the map of all existent instances of Unpacker.
|
private boolean |
fileMatchesOnePattern(String filename,
ArrayList patterns) |
private List[] |
getCustomActions()
Returns the defined custom actions split into types including a constructed type for the file
related installer listeners.
|
private InputStream |
getPackAsStream(int n)
Returns a stream to a pack, location depending on if it's web based.
|
static HashMap |
getRunningInstances()
Returns a copy of the active unpacker instances.
|
private void |
handleAdditionalUninstallData(UninstallData udata,
List[] customData)
Adds additional unistall data to the uninstall data object.
|
private void |
informListeners(List[] customActions,
int action,
Object firstParam,
Object secondParam,
Object thirdParam)
Informs all listeners which would be informed at the given action type.
|
static boolean |
interruptAll(long waitTime)
Initiate interrupt of all alive Unpacker and waits until all Unpacker are interrupted or the
wait time has arrived.
|
static boolean |
isDiscardInterrupt()
Returns whether an interrupt request should be discarded or not.
|
static boolean |
isInterruptDesired()
Returns the interrupt desired state.
|
private static boolean |
isInterruptReady() |
private boolean |
mkDirsWithEnhancement(File dest,
PackFile pf,
List[] customActions)
Creates the given directory recursive and calls the method "afterDir" of each listener with
the current file object and the pack file object.
|
private boolean |
performInterrupted()
Sets the interrupt flag for this Unpacker to INTERRUPTED if the previos state was INTERRUPT
or INTERRUPTED and returns whether interrupt was initiate or not.
|
private void |
performUpdateChecks(ArrayList updatechecks) |
private List |
preparePatterns(ArrayList list,
org.apache.regexp.RECompiler recompiler) |
private void |
putUninstaller()
Puts the uninstaller.
|
private void |
removeFromInstances()
Removes this from the map of all existent instances of Unpacker.
|
void |
run()
The run method.
|
static void |
setDiscardInterrupt(boolean di)
Sets the discard interrupt flag.
|
private static void |
setInterruptAll()
Initiate interrupt of all alive Unpacker.
|
private static void |
setInterruptDesired(boolean interruptDesired) |
private boolean |
shouldInterrupt()
Returns whether interrupt was initiate or not for this Unpacker.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private AutomatedInstallData idata
private AbstractUIProgressHandler handler
private UninstallData udata
private VariableSubstitutor vs
private File absolute_installpath
private LocaleDatabase langpack
private static boolean interruptDesired
private static boolean discardInterrupt
private static final String LANG_FILE_NAME
public static final String ALIVE
public static final String INTERRUPT
public static final String INTERRUPTED
public Unpacker(AutomatedInstallData idata, AbstractUIProgressHandler handler)
idata
- The installation data.handler
- The installation progress handler.public static HashMap getRunningInstances()
private void addToInstances()
private void removeFromInstances()
private static void setInterruptAll()
public static boolean interruptAll(long waitTime)
waitTime
- wait time in millisecoundsprivate static boolean isInterruptReady()
private boolean performInterrupted()
private boolean shouldInterrupt()
public void run()
private void performUpdateChecks(ArrayList updatechecks)
updatechecks
- private boolean fileMatchesOnePattern(String filename, ArrayList patterns)
filename
- patterns
- private List preparePatterns(ArrayList list, org.apache.regexp.RECompiler recompiler)
list
- A list of file name patterns (in ant fileset syntax)recompiler
- The regular expression compiler (used to speed up RE compiling).private void putUninstaller() throws Exception
Exception
- Description of the Exceptionprivate InputStream getPackAsStream(int n) throws Exception
n
- The pack number.Exception
- Description of the Exceptionprivate void informListeners(List[] customActions, int action, Object firstParam, Object secondParam, Object thirdParam) throws Exception
customActions
- array of lists with the custom action objectsaction
- identifier for which callback should be calledfirstParam
- first parameter for the callsecondParam
- second parameter for the callthirdParam
- third parameter for the callException
private List[] getCustomActions()
private void handleAdditionalUninstallData(UninstallData udata, List[] customData)
udata
- unistall datacustomData
- array of lists of custom action data like uninstaller listenersprivate boolean mkDirsWithEnhancement(File dest, PackFile pf, List[] customActions) throws Exception
dest
- the directory which should be createdpf
- current pack file objectcustomActions
- all defined custom actionsException
public static boolean isDiscardInterrupt()
public static void setDiscardInterrupt(boolean di)
di
- the discard interrupt flag to setpublic static boolean isInterruptDesired()
private static void setInterruptDesired(boolean interruptDesired)
interruptDesired
- The interrupt desired flag to setWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses