A mini webserver that should be embedded in another application. It can
server any file that is available from classloaders that are registered with
it, including class-files.
Its primary purpose is to simplify dynamic class-loading in RMI. Create an
instance of it, register a classloader with your classes, start it, and
you'll be able to let RMI-clients dynamically download classes from it.
It is configured by calling any methods programmatically prior to startup.
author: Marc Fleury author: Scott Stark version: $Revision: 62433 $ See Also:WebClassLoader
addClassLoader(ClassLoader cl) Add a class loader to the web server map and return the URL that should be
used as the annotated codebase for classes that are to be available via
RMI dynamic classloading.
Add a class loader to the web server map and return the URL that should be
used as the annotated codebase for classes that are to be available via
RMI dynamic classloading. The codebase URL is formed by taking the
java.rmi.server.codebase system property and adding a subpath unique for
the class loader instance.
Parameters: cl - - the ClassLoader instance to begin serving download requestsfor the annotated codebase to use if java.rmi.server.codebase is set,null otherwise. See Also:WebServer.getClassLoaderKey(ClassLoader)
Augment the type suffix to mime type mappings
Parameters: extension - - the type extension without a period(class, txt) Parameters: type - - the mime type string
Listen threads entry point. Here we accept a client connection and located
requested classes/resources using the class loader specified in the http
request.