| org.jboss.web.WebClassLoader
WebClassLoader | public class WebClassLoader extends LoaderRepositoryClassLoader (Code) | | 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.
See Also: WebClassLoader.getUrls() See Also: WebClassLoader.setWebURLs(URL[]) author: Scott Stark. author: Sacha Labourey author: Vladimir Blagojevic author: Francisco Reverbel version: $Revision: 57209 $ |
Constructor Summary | |
public | WebClassLoader(ObjectName containerName, RepositoryClassLoader parent) Creates new WebClassLoader.
Subclasses must have a constructor with the same signature. |
Method Summary | |
public byte[] | getBytes(Class clz) Gets the bytecodes for a given class.
This implementation always returns null, indicating that it is unable
to get bytecodes for any class. | public String | getCodebaseString() | public ObjectName | getContainer() Gets the JMX ObjectName of the WebClassLoader's container. | public String | getKey() Gets a string key used as the key into the WebServer's loaderMap. | public URL[] | getLocalURLs() Access the URLClassLoader.getURLs() value. | public URL | getURL() Returns the single URL for my parent, an UnifiedClassLoader. | public URL[] | getURLs() Get the list of URLs that should be used as the RMI annotated codebase.
This is the URLs previously set via setWebURLs. | public void | setWebURLs(URL[] webURLs) Set the URLs that should be returned from this classes getURLs() override. |
WebClassLoader | public WebClassLoader(ObjectName containerName, RepositoryClassLoader parent)(Code) | | Creates new WebClassLoader.
Subclasses must have a constructor with the same signature.
|
getBytes | public byte[] getBytes(Class clz)(Code) | | Gets the bytecodes for a given class.
This implementation always returns null, indicating that it is unable
to get bytecodes for any class. Should be overridden by subclasses
with bytecode generation capability (such as the classloader used by
the iiop module, which generates IIOP stubs on the fly).
Parameters: cls - a Class a byte array with the bytecodes for class cls , ornull if this classloader is unable to return such byte array. |
getContainer | public ObjectName getContainer()(Code) | | Gets the JMX ObjectName of the WebClassLoader's container.
|
getKey | public String getKey()(Code) | | Gets a string key used as the key into the WebServer's loaderMap.
|
getLocalURLs | public URL[] getLocalURLs()(Code) | | Access the URLClassLoader.getURLs() value.
the URLs used for local class and resource loading |
getURL | public URL getURL()(Code) | | Returns the single URL for my parent, an UnifiedClassLoader.
|
getURLs | public URL[] getURLs()(Code) | | Get the list of URLs that should be used as the RMI annotated codebase.
This is the URLs previously set via setWebURLs. If setWebURLs has not
been invoked or was passed in a null value, the super class value of
getURLs() is used.
the local web URLs if not null, else the value of super.getURLs() |
setWebURLs | public void setWebURLs(URL[] webURLs)(Code) | | Set the URLs that should be returned from this classes getURLs() override.
webURLs, the set of URL codebases to be used for remote class loading. |
|
|