wt.boot
Class JarInstaller

java.lang.Object
  extended bywt.boot.JarInstaller

class JarInstaller
extends Object

A class that installs downloaded JAR/ZIP files into a local cache.


Nested Class Summary
(package private) static class JarInstaller.DownloadThread
           
(package private) static class JarInstaller.InflateThread
           
(package private) static class JarInstaller.PropertiesOutputStream
           
(package private) static class JarInstaller.SharedJarFile
           
 
Field Summary
(package private) static String ALLOW_USER_INTERACTION
           
private  boolean allowUserInteraction
           
private  AppletContext appletContext
           
(package private) static String AUTO_DOWNLOAD
           
(package private) static String AUTO_INFLATE
           
(package private) static String BOOT_PROPERTIES
           
private  Properties bootProperties
           
private  File bootPropertiesFile
           
(package private) static String CACHE_DIR
           
private  String cacheDirName
           
(package private) static String CAPTURE_FILE
           
(package private) static String CHECK_VERSION
           
private  URL codebase
           
(package private) static String DOWNLOAD_URL
           
(package private) static String ENABLED
           
private  HttpURLConnection httpUrlConnection
           
(package private) static String INFLATE
           
private  ZipFile jar
           
private  File jarFile
           
private  String jarFileName
           
private  Properties jarProperties
           
private  File jarPropertiesFile
           
(package private) static String LAST_MODIFIED
           
private  long lastModified
           
private  Locale locale
           
private  boolean localized
           
private  String NOT_AVAILABLE
           
private  String NOT_FOUND_OR_MISSING_DATE
           
(package private) static String PACKAGE_PROPERTIES
           
private  Frame parentFrame
           
private  Properties remoteBootProperties
           
private static String RESOURCE
           
(package private) static String RMI_FAILOVER_TIMEOUT
           
(package private) static String RMI_SOCKET_FACTORY
           
(package private) static String SET_PROPERTY
           
(package private) static String SHOW_CLASSPATH
           
(package private) static String SIZE
           
private  URL sourceUrl
           
(package private) static String USE_FULL_HOST_NAMES
           
private  boolean useCache
           
private  boolean verbose
           
(package private) static String VERBOSE_INSTALLER
           
(package private) static String VERBOSE_LOADER
           
(package private) static String VERSION
           
 
Constructor Summary
(package private) JarInstaller(URL codebase, String jar_file_name)
           
 
Method Summary
protected  boolean announceNewVersion(int remote_version, int local_version, URL download_url)
           
(package private)  boolean checkVersion()
           
private  boolean confirmDownload()
           
protected  void deleteJarFile()
           
protected  void deleteJarPropertiesFile()
           
protected  void displayException(Throwable t)
           
protected  void getBootProperties()
           
protected  Properties getDefaultProperties()
           
protected  String getFullCodebaseHostName()
           
(package private)  ZipFile getJar()
           
(package private)  ZipFile getJar(String jar_file_name)
           
protected  void getJarProperties()
           
protected  InputStream getLatest(long if_modified_since)
           
protected  Locale getLocale()
           
protected  Properties getLocalPackageProperties()
           
private  String getMessage(String format, Object[] args)
           
protected  Frame getParentFrame()
           
(package private)  String getProperty(String name)
           
(package private)  String getProperty(String name, String default_value)
           
protected  Properties getRemotePackageProperties()
           
protected  void inflate()
           
(package private)  boolean init()
           
private  void localize(Locale locale)
           
private static JarInstaller newInstaller_default(URL codebase, String jar_file_name)
           
(package private) static JarInstaller newInstaller(URL codebase)
           
(package private) static JarInstaller newInstaller(URL codebase, String jar_file_name)
           
protected  void openJarFile()
           
protected  void resetHttp()
           
protected  void resetLocale()
           
protected  void saveBootProperties()
           
protected  void saveJarFile(InputStream input_stream)
           
protected  void saveJarProperties()
           
protected  void setAppletContext(AppletContext applet_context)
           
protected  void setBootProperties()
           
(package private)  void setLocale(Locale locale)
           
(package private)  void setParentFrame(Frame parent_frame)
           
protected  void setRMISocketFactory(String factory_class_name)
           
protected  void setSystemProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

localized

private boolean localized

NOT_FOUND_OR_MISSING_DATE

private String NOT_FOUND_OR_MISSING_DATE

NOT_AVAILABLE

private String NOT_AVAILABLE

CACHE_DIR

static final String CACHE_DIR
See Also:
Constant Field Values

VERBOSE_INSTALLER

static final String VERBOSE_INSTALLER
See Also:
Constant Field Values

VERBOSE_LOADER

static final String VERBOSE_LOADER
See Also:
Constant Field Values

INFLATE

static final String INFLATE
See Also:
Constant Field Values

LAST_MODIFIED

static final String LAST_MODIFIED
See Also:
Constant Field Values

SIZE

static final String SIZE
See Also:
Constant Field Values

CHECK_VERSION

static final String CHECK_VERSION
See Also:
Constant Field Values

VERSION

static final String VERSION
See Also:
Constant Field Values

DOWNLOAD_URL

static final String DOWNLOAD_URL
See Also:
Constant Field Values

BOOT_PROPERTIES

static final String BOOT_PROPERTIES
See Also:
Constant Field Values

PACKAGE_PROPERTIES

static final String PACKAGE_PROPERTIES
See Also:
Constant Field Values

SET_PROPERTY

static final String SET_PROPERTY
See Also:
Constant Field Values

RMI_SOCKET_FACTORY

static final String RMI_SOCKET_FACTORY
See Also:
Constant Field Values

RMI_FAILOVER_TIMEOUT

static final String RMI_FAILOVER_TIMEOUT
See Also:
Constant Field Values

SHOW_CLASSPATH

static final String SHOW_CLASSPATH
See Also:
Constant Field Values

ENABLED

static final String ENABLED
See Also:
Constant Field Values

USE_FULL_HOST_NAMES

static final String USE_FULL_HOST_NAMES
See Also:
Constant Field Values

AUTO_DOWNLOAD

static final String AUTO_DOWNLOAD
See Also:
Constant Field Values

AUTO_INFLATE

static final String AUTO_INFLATE
See Also:
Constant Field Values

ALLOW_USER_INTERACTION

static final String ALLOW_USER_INTERACTION
See Also:
Constant Field Values

CAPTURE_FILE

static final String CAPTURE_FILE
See Also:
Constant Field Values

codebase

private URL codebase

jarFileName

private String jarFileName

jarFile

private File jarFile

cacheDirName

private String cacheDirName

bootPropertiesFile

private File bootPropertiesFile

bootProperties

private Properties bootProperties

remoteBootProperties

private Properties remoteBootProperties

jarPropertiesFile

private File jarPropertiesFile

jarProperties

private Properties jarProperties

lastModified

private long lastModified

jar

private ZipFile jar

sourceUrl

private URL sourceUrl

verbose

private boolean verbose

httpUrlConnection

private HttpURLConnection httpUrlConnection

useCache

private boolean useCache

parentFrame

private Frame parentFrame

locale

private Locale locale

appletContext

private AppletContext appletContext

allowUserInteraction

private boolean allowUserInteraction
Constructor Detail

JarInstaller

JarInstaller(URL codebase,
             String jar_file_name)
Method Detail

newInstaller

static JarInstaller newInstaller(URL codebase)

newInstaller

static JarInstaller newInstaller(URL codebase,
                                 String jar_file_name)

newInstaller_default

private static JarInstaller newInstaller_default(URL codebase,
                                                 String jar_file_name)

setParentFrame

void setParentFrame(Frame parent_frame)

getParentFrame

protected Frame getParentFrame()

setLocale

void setLocale(Locale locale)

getLocale

protected Locale getLocale()

setAppletContext

protected void setAppletContext(AppletContext applet_context)

getJar

ZipFile getJar(String jar_file_name)

getJar

ZipFile getJar()

init

boolean init()

checkVersion

boolean checkVersion()
               throws IOException
Throws:
IOException

getProperty

String getProperty(String name)

getProperty

String getProperty(String name,
                   String default_value)

displayException

protected void displayException(Throwable t)

getFullCodebaseHostName

protected String getFullCodebaseHostName()

getBootProperties

protected void getBootProperties()
                          throws IOException
Throws:
IOException

setBootProperties

protected void setBootProperties()

saveBootProperties

protected void saveBootProperties()
                           throws IOException
Throws:
IOException

setSystemProperties

protected void setSystemProperties()

resetLocale

protected void resetLocale()

resetHttp

protected void resetHttp()

setRMISocketFactory

protected void setRMISocketFactory(String factory_class_name)

getJarProperties

protected void getJarProperties()
                         throws IOException
Throws:
IOException

saveJarProperties

protected void saveJarProperties()
                          throws IOException
Throws:
IOException

getLatest

protected InputStream getLatest(long if_modified_since)
                         throws IOException
Throws:
IOException

confirmDownload

private boolean confirmDownload()

saveJarFile

protected void saveJarFile(InputStream input_stream)
                    throws IOException
Throws:
IOException

inflate

protected void inflate()
                throws IOException
Throws:
IOException

deleteJarFile

protected void deleteJarFile()
                      throws IOException
Throws:
IOException

deleteJarPropertiesFile

protected void deleteJarPropertiesFile()
                                throws IOException
Throws:
IOException

openJarFile

protected void openJarFile()
                    throws IOException
Throws:
IOException

getDefaultProperties

protected Properties getDefaultProperties()
                                   throws IOException
Throws:
IOException

getRemotePackageProperties

protected Properties getRemotePackageProperties()
                                         throws IOException
Throws:
IOException

getLocalPackageProperties

protected Properties getLocalPackageProperties()
                                        throws IOException
Throws:
IOException

announceNewVersion

protected boolean announceNewVersion(int remote_version,
                                     int local_version,
                                     URL download_url)

localize

private void localize(Locale locale)

getMessage

private String getMessage(String format,
                          Object[] args)