metaglue
Class MetaglueClassLoader
java.lang.Object
|
+--java.lang.ClassLoader
|
+--metaglue.MetaglueClassLoader
- public class MetaglueClassLoader
- extends ClassLoader
A ClassLoader which can transfer files between MetaglueAgents.
Highly useful for letting agents defined in one society interact
with agents defined elsewhere, but probably insecure as all get
out.
Here's the idea: RMI requires that you specify where classes get
loaded from. Normally, that's either the local class path into the
filesystem, or it's over the web through special URLs. This will
talk to a MetaglueAgent and get the stub information for the
classes that it has loaded.
This is designed to be lightweight and used inside a
ChainingClassLoader, which handles the organization of multiple
such loaders.
- See Also:
ChainingClassLoader
,
ClassLoader
Methods inherited from class java.lang.ClassLoader |
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MetaglueClassLoader
public MetaglueClassLoader(Metaglue ma,
ClassLoader parent)
setMetaglue
public void setMetaglue(Metaglue ma)
getMetaglueAgentID
public AgentID getMetaglueAgentID()
equals
public boolean equals(AgentID a)
fetchClassData
public byte[] fetchClassData(String name)
throws ClassNotFoundException,
RemoteException
findClass
protected Class findClass(String name)
throws ClassNotFoundException
- Get the class for the given name by talking to the MetaglueAgent.
- Overrides:
findClass
in class ClassLoader
- Parameters:
name
- the name of the class- Returns:
- the class given that name.