com.izforge.izpack.util
Class FreeThread

java.lang.Object
  extended by java.lang.Thread
      extended by com.izforge.izpack.util.FreeThread
All Implemented Interfaces:
java.lang.Runnable

public class FreeThread
extends java.lang.Thread

This class implements a thred that can be used to free native libraries safely.

Version:
0.0.1 / 2/6/02
Author:
Elmar Grom

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
private  NativeLibraryClient client
           
private  java.lang.String name
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FreeThread(java.lang.String name, NativeLibraryClient client)
          Standard constructor.
 
Method Summary
 void run()
          The run() method.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private java.lang.String name

client

private NativeLibraryClient client
Constructor Detail

FreeThread

public FreeThread(java.lang.String name,
                  NativeLibraryClient client)
Standard constructor.

Parameters:
name - the name of the library to free. The exact form of the name may be operating system dependent. On Microsoft Windows this must be just the library name, without path but with extension.
client - reference of the client object that is linked with the library to be freed.
Method Detail

run

public void run()
The run() method. Frees the library. Note that the thread is likely to get 'frozen' and the application can only be treminated through a call to System.exit().

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread