JBoss API: Class WebClassLoader

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.web
Class WebClassLoader

    java.lang.Object
      |
      +--java.lang.ClassLoader
            |
            +--java.security.SecureClassLoader
                  |
                  +--java.net.URLClassLoader
                        |
                        +--org.jboss.web.WebClassLoader

public class WebClassLoader
extends java.net.URLClassLoader

A simple subclass of URLClassLoader that overrides the getURLs() method to return a different set of URLs for remote loading than what is used for local loading. This class is used in conjunction with the WebService mbean to allow dynamic loading of resources and classes from deployed ears, ejb jars and wars.

Version:
  $Revision: 1.1 $
Author:
  Scott_Stark@displayscape.com, Sacha Labourey , Vladimir Blagojevic
See Also:
  `#getUrls()`, `setWebURLs(URL[])`

Constructor Summary
`WebClassLoader(java.net.URL[] urls)` Creates new WebClassLoader
`WebClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent)`
`WebClassLoader(java.net.URL[] urls, java.lang.ClassLoader parent, java.net.URLStreamHandlerFactory factory)`

Method Summary
`java.net.URL[]` | `getLocalURLs()` Access the URLClassLoader.getURLs() value.
`java.net.URL[]` | `getURLs()` Get the list of URLs that should be used as the RMI annotated codebase.
`void` | `setWebURLs(java.net.URL[] webURLs)` Set the URLs that should be returned from this classes getURLs() override.

Methods inherited from class java.net.URLClassLoader
`addURL, definePackage, findClass, findResource, findResources, getPermissions, newInstance, newInstance`

Methods inherited from class java.security.SecureClassLoader
`defineClass`

Methods inherited from class java.lang.ClassLoader
`defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, 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`

Constructor Detail

### WebClassLoader

    public WebClassLoader(java.net.URL[] urls)

  Creates new WebClassLoader

### WebClassLoader

    public WebClassLoader(java.net.URL[] urls,
                          java.lang.ClassLoader parent)

### WebClassLoader

    public WebClassLoader(java.net.URL[] urls,
                          java.lang.ClassLoader parent,
                          java.net.URLStreamHandlerFactory factory)

Method Detail

### getURLs

    public java.net.URL[] getURLs()

  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.
  Overrides:
    `getURLs` in class `java.net.URLClassLoader`
  Returns:
    the local web URLs if not null, else the value of super.getURLs()

### getLocalURLs

    public java.net.URL[] getLocalURLs()

  Access the URLClassLoader.getURLs() value.
  Returns:
    the URLs used for local class and resource loading

### setWebURLs

    public void setWebURLs(java.net.URL[] webURLs)

  Set the URLs that should be returned from this classes getURLs() override.
  Parameters:
    `webURLs,` - the set of URL codebases to be used for remote class loading.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 The JBoss Organization. All Rights Reserved.