com.objectwave.customClassLoader.cclp
Class Handler

java.lang.Object
  |
  +--java.net.URLStreamHandler
        |
        +--com.objectwave.customClassLoader.cclp.Handler

public class Handler
extends java.net.URLStreamHandler

Needes for custom class loader support. The getResource(String name) return an URL that will be handled by this handler. Naming convention is very important to this custom protocol handler. Java will look for at the system properities to get a list of packages that can handle different protocols. If the protocol is CCLP it will look for a class called myPropertyPackage.cclp.Handler
The following code will register this class to handle the cclp protocol.
java.util.Properties props = System.getProperties(); props.put("java.protocol.handler.pkgs", "com.objectwave.customClassLoader");


Constructor Summary
Handler()
           
 
Method Summary
 java.net.URLConnection openConnection(java.net.URL u)
          The key method that makes this work with our custom class loaders.
 
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, parseURL, sameFile, setURL, setURL, toExternalForm
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Handler

public Handler()
Method Detail

openConnection

public java.net.URLConnection openConnection(java.net.URL u)
The key method that makes this work with our custom class loaders.

Specified by:
openConnection in class java.net.URLStreamHandler