PageBoxLib
Class InstallClassLoader

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byPageBoxLib.InstallClassLoader

class InstallClassLoader
extends java.lang.ClassLoader

Class loader used to load the installation class.
Invoked by Repository.

Changes:

alexis.grandemange@pagebox.net

Copyright (c) 2002-2004 Alexis Grandemange

This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public License
 as published by the Free Software Foundation; version 2.1 of the
 License.
 This library is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU Lesser General Public License for more details.
 A copy of the GNU Lesser General Public License lesser.txt should be
 included in the distribution.

Version:
0, 1, 0
Author:
Alexis Grandemange

Nested Class Summary
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
private  java.lang.String archName
          Archive name
(package private)  java.lang.String classDir
          archive directory
(package private)  java.util.HashMap classes
          Class cache Key: class name Value: Class object
private  Log log
          Logging object
(package private)  java.lang.ClassLoader parent
          Class loader of the class that instantiates InstallClassLoader.
private  java.security.ProtectionDomain pd
          Install class protection domain
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
(package private) InstallClassLoader(java.lang.String classDir, java.lang.ClassLoader parent, java.lang.String repUrl, Log log, java.lang.String archDir, java.lang.String archName)
          Constructor.
 
Method Summary
 java.lang.Class loadClass(java.lang.String name, boolean resolve)
          Method called by DeployImpl and by the JVM to load classes.
private  java.lang.Class loadForward(java.lang.String name)
          Forwards class load requests to the system and then to the parent class loader.
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classDir

java.lang.String classDir
archive directory


classes

java.util.HashMap classes
Class cache


parent

java.lang.ClassLoader parent
Class loader of the class that instantiates InstallClassLoader.


pd

private java.security.ProtectionDomain pd
Install class protection domain


log

private Log log
Logging object


archName

private java.lang.String archName
Archive name

Constructor Detail

InstallClassLoader

InstallClassLoader(java.lang.String classDir,
                   java.lang.ClassLoader parent,
                   java.lang.String repUrl,
                   Log log,
                   java.lang.String archDir,
                   java.lang.String archName)
Constructor. Sets the installation directory.

Parameters:
classDir - classes directory
parent - class loader of the class that created InstallClassLoader
repUrl - URL of the RepoQuery Web service of the deploying Repository
log - logging object
archDir - archive directory
archName - archive name.
Method Detail

loadForward

private final java.lang.Class loadForward(java.lang.String name)
                                   throws java.lang.ClassNotFoundException
Forwards class load requests to the system and then to the parent class loader.

Parameters:
name - class name
Returns:
loaded class
Throws:
java.lang.ClassNotFoundException

loadClass

public java.lang.Class loadClass(java.lang.String name,
                                 boolean resolve)
                          throws java.lang.ClassNotFoundException
Method called by DeployImpl and by the JVM to load classes.

Parameters:
name - class name
resolve - true if the class must be resolved
Returns:
loaded class
Throws:
java.lang.ClassNotFoundException