org.mortbay.io.tx
Class Handler

java.lang.Object
  extended byjava.net.URLStreamHandler
      extended byorg.mortbay.io.tx.Handler

public class Handler
extends URLStreamHandler

Handler for the pseudo URL protocol tx. This URLStreamHandler wraps other URLStream so that the context can be buffered and potentially transformed. For example, the URL "tx:file:/etc/passwd" will wrap the URL "file:/etc/passwd" and the contents loaded into a byte array. The current thread and it's parents will then be inspected looking for a loader that implements the Transformer interface, which if found is used to transform the bytes of the content before streaming them as the content of the URL.

Author:
gregw
See Also:
{@link org.mortbay.jetty.webapp.TransformingWebAppClassLoader}

Field Summary
static String PROTOCOL
           
 
Constructor Summary
Handler()
           
 
Method Summary
protected  URLConnection openConnection(URL url)
           
static void register()
           
 
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
 

Field Detail

PROTOCOL

public static final String PROTOCOL
See Also:
Constant Field Values
Constructor Detail

Handler

public Handler()
Method Detail

register

public static void register()

openConnection

protected URLConnection openConnection(URL url)
                                throws IOException
Throws:
IOException