|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
org.jboss.classloading.spi.DelegatingClassLoader
org.jboss.web.WebClassLoader
public class WebClassLoader
A simple subclass of URLClassLoader that is used in conjunction with the the WebService mbean to allow dynamic loading of resources and classes from deployed ears, ejb jars and wars. A WebClassLoader is associated with a Container and must have an UnifiedClassLoader as its parent. It overrides the getURLs() method to return a different set of URLs for remote loading than what is used for local loading.
WebClassLoader has two methods meant to be overriden by subclasses: getKey() and getBytes(). The latter is a no-op in this implementation and should be overriden by subclasses with bytecode generation ability, such as the classloader used by the iiop module.
WebClassLoader subclasses must have a constructor with the same signature as the WebClassLoader constructor.
#getUrls()
,
setWebURLs(URL[])
Field Summary |
---|
Fields inherited from class org.jboss.classloading.spi.DelegatingClassLoader |
---|
standard |
Constructor Summary | |
---|---|
WebClassLoader(ObjectName containerName,
org.jboss.classloading.spi.RealClassLoader parent)
Creates new WebClassLoader. |
Method Summary | |
---|---|
byte[] |
getBytes(Class clz)
Gets the bytecodes for a given class. |
String |
getCodebaseString()
|
ObjectName |
getContainer()
Gets the JMX ObjectName of the WebClassLoader's container. |
String |
getKey()
Gets a string key used as the key into the WebServer's loaderMap. |
URL[] |
getURLs()
Get the list of URLs that should be used as the RMI annotated codebase. |
void |
setWebURLs(URL[] webURLs)
Set the URLs that should be returned from this classes getURLs() override. |
Methods inherited from class org.jboss.classloading.spi.DelegatingClassLoader |
---|
getResource, loadClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebClassLoader(ObjectName containerName, org.jboss.classloading.spi.RealClassLoader parent)
containerName
- the container nameparent
- the parent real classloaderMethod Detail |
---|
public String getKey()
public ObjectName getContainer()
public URL[] getURLs()
public void setWebURLs(URL[] webURLs)
webURLs,
- the set of URL codebases to be used for remote class loading.public String getCodebaseString()
public byte[] getBytes(Class clz)
cls
- a Class
cls
, or
null if this classloader is unable to return such byte array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |