org.kaariboga.core
Class KaaribogaClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
              |
              +--org.kaariboga.core.KaaribogaClassLoader

public class KaaribogaClassLoader
extends java.security.SecureClassLoader

Helper class that creates a class from an array of bytes. This is used in the kaariboga input stream class. When a new agent arrives and the class source code is unknown the KaaribogaClassLoader sends a GET_CLASS message to the host that sent the agent to get the source code.


Inner classes inherited from class java.lang.ClassLoader
java.lang.ClassLoader.NativeLibrary
 
Field Summary
(package private)  KaaribogaAddress base
          The address of the KaaribogaBase that called this class loader.
(package private)  ClassManager classManager
          Handles classes and byte codes.
(package private)  KaaribogaAddress sourceHost
          The host that holds the source code for the class.
 
Fields inherited from class java.security.SecureClassLoader
debug, initialized, pdcache
 
Fields inherited from class java.lang.ClassLoader
bootstrapClassPath, classes, defaultDomain, defaultPermissions, getClassLoaderPerm, loadedLibraryNames, nativeLibraries, nativeLibraryContext, nocerts, package2certs, packages, parent, scl, sclSet, sys_paths, systemNativeLibraries, usr_paths
 
Constructor Summary
KaaribogaClassLoader(ClassManager clManager, KaaribogaAddress base, KaaribogaAddress sourceHost)
          Creates a new KaaribogaClassLoader
 
Method Summary
 java.lang.Class findClass(java.lang.String name)
          Called by the super class method loadClass(String name) to load the class named class.
protected  byte[] loadClassData(java.lang.String name)
          Called by findClass to get the class byte code.
 
Methods inherited from class java.security.SecureClassLoader
, check, defineClass, getPermissions, getProtectionDomain
 
Methods inherited from class java.lang.ClassLoader
addClass, checkCerts, checkPackageAccess, compareCerts, copyFrom, defineClass, defineClass, defineClass, defineClass0, definePackage, findBootstrapClass, findBootstrapClass0, findLibrary, findLoadedClass, findNative, findResource, findResources, findSystemClass, getBootstrapClassPath, getBootstrapResource, getBootstrapResources, getCallerClassLoader, getDefaultDomain, getGetClassLoaderPerm, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, initializePath, isAncestor, loadClass, loadClass, loadClassInternal, loadLibrary, loadLibrary0, removeSystemClassLoader, resolveClass, resolveClass0, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

classManager

ClassManager classManager
Handles classes and byte codes.

base

KaaribogaAddress base
The address of the KaaribogaBase that called this class loader.

sourceHost

KaaribogaAddress sourceHost
The host that holds the source code for the class.
Constructor Detail

KaaribogaClassLoader

public KaaribogaClassLoader(ClassManager clManager,
                            KaaribogaAddress base,
                            KaaribogaAddress sourceHost)
Creates a new KaaribogaClassLoader
Parameters:
clManager - Class manager serving this class loader; contains a cache of classes.
base - The base that uses this class loader; to identify the sender in communications.
sourceHost - The host that serves the byte code for a class.
Method Detail

loadClassData

protected byte[] loadClassData(java.lang.String name)
                        throws java.lang.ClassNotFoundException
Called by findClass to get the class byte code.
Parameters:
name - Name of the class to load.

findClass

public java.lang.Class findClass(java.lang.String name)
                          throws java.lang.ClassNotFoundException
Called by the super class method loadClass(String name) to load the class named class.
Overrides:
findClass in class java.lang.ClassLoader