org.jboss.embedded.url
Class HandlerFactoryHack

java.lang.Object
  extended by org.jboss.embedded.url.HandlerFactoryHack

public class HandlerFactoryHack
extends java.lang.Object

Tries to set URL.setURLStreamHandlerFactory() with the provided factory. If it fails, it tries to reset handler by creating a BridgeHandlerFactory and hacking the JDK to overcome URL.setURLStreamHandlerFactory()'s limitation of only being able to be set up once. If there is already an existing handler factory then this factory will be added to the bridge list

Version:
$Revision: 1.1 $
Author:
Bill Burke

Constructor Summary
HandlerFactoryHack()
           
 
Method Summary
 java.util.List<java.net.URLStreamHandlerFactory> getFactories()
           
protected  void hack()
           
 void setFactories(java.util.List<java.net.URLStreamHandlerFactory> factories)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerFactoryHack

public HandlerFactoryHack()
Method Detail

getFactories

public java.util.List<java.net.URLStreamHandlerFactory> getFactories()

setFactories

public void setFactories(java.util.List<java.net.URLStreamHandlerFactory> factories)

start

public void start()
           throws java.lang.Exception
Throws:
java.lang.Exception

hack

protected void hack()
             throws java.lang.Exception
Throws:
java.lang.Exception