org.objectweb.proactive.core.classloader
Class ProActiveRMIClassLoaderSpi

java.lang.Object
  extended byjava.rmi.server.RMIClassLoaderSpi
      extended byorg.objectweb.proactive.core.classloader.ProActiveRMIClassLoaderSpi

public class ProActiveRMIClassLoaderSpi
extends java.rmi.server.RMIClassLoaderSpi

This class allows dynamic remote downloading of classes from other proactive runtimes when using RMI as the communication protocol, or when streams are marshalled using the RMI mechanism.

It is instantiated and invoked by the RMIClassLoader when loading classes while deserializing an incoming stream. It delegates calls to the default provider instance of the RMIClassLoaderSpi

If the System ClassLoader is the ProActiveClassLoader, then delegated calls to the default provider instance of RMIClassLoader are given ProActiveClassLoader as the defaultLoader parameters. This ensures that ProActiveClassLoader is used, otherwise, the sun.rmi.MarshalInputStream which deserializes the stream will use "the first class loader on the execution stack", which can be different from ProActiveClassLoader.

In the current implementation, there are no classes downloaded through http using the codebase path

Author:
Matthieu Morel

Constructor Summary
ProActiveRMIClassLoaderSpi()
           
 
Method Summary
 java.lang.String getClassAnnotation(java.lang.Class arg0)
           
 java.lang.ClassLoader getClassLoader(java.lang.String codebase)
           
 java.lang.Class loadClass(java.lang.String codebase, java.lang.String name, java.lang.ClassLoader defaultLoader)
          see RMIClassLoaderSpi.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader) If the System ClassLoader is ProActiveClassLoader, this classLoader is given to the defaultProviderInstance as the default loader for this method.
 java.lang.Class loadProxyClass(java.lang.String codebase, java.lang.String[] interfaces, java.lang.ClassLoader defaultLoader)
          see RMIClassLoaderSpi.loadProxyClass(java.lang.String, java.lang.String[], java.lang.ClassLoader) If the System ClassLoader is ProActiveClassLoader, this classLoader is given to the defaultProviderInstance as the default loader for this method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProActiveRMIClassLoaderSpi

public ProActiveRMIClassLoaderSpi()
Method Detail

loadClass

public java.lang.Class loadClass(java.lang.String codebase,
                                 java.lang.String name,
                                 java.lang.ClassLoader defaultLoader)
                          throws java.net.MalformedURLException,
                                 java.lang.ClassNotFoundException
see RMIClassLoaderSpi.loadClass(java.lang.String, java.lang.String, java.lang.ClassLoader) If the System ClassLoader is ProActiveClassLoader, this classLoader is given to the defaultProviderInstance as the default loader for this method.

Throws:
java.net.MalformedURLException
java.lang.ClassNotFoundException

loadProxyClass

public java.lang.Class loadProxyClass(java.lang.String codebase,
                                      java.lang.String[] interfaces,
                                      java.lang.ClassLoader defaultLoader)
                               throws java.net.MalformedURLException,
                                      java.lang.ClassNotFoundException
see RMIClassLoaderSpi.loadProxyClass(java.lang.String, java.lang.String[], java.lang.ClassLoader) If the System ClassLoader is ProActiveClassLoader, this classLoader is given to the defaultProviderInstance as the default loader for this method.

Throws:
java.net.MalformedURLException
java.lang.ClassNotFoundException

getClassLoader

public java.lang.ClassLoader getClassLoader(java.lang.String codebase)
                                     throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

getClassAnnotation

public java.lang.String getClassAnnotation(java.lang.Class arg0)


Copyright 2001-2005 INRIA All Rights Reserved.