ccs.protocol.mux
Class Handler

java.lang.Object
  extended by java.net.URLStreamHandler
      extended by ccs.protocol.mux.Handler

Deprecated. This has fallen out of use in general. It still works AFAIK; if any application finds a use for it, we can move it into the kernel proper. It really doesn't belong in here any more, though.

public class Handler
extends java.net.URLStreamHandler

The mux:// (multiplexer) protocol provides access to an arbitrary collection of pre-registered URLConnection classes, using a path prefix as a discriminator. This is especially useful where the URLConnection classes are in the classbase (loaded by the Checkpoint classloader, ccs.utils.Loader), since the standard Java mechanism will not find them.


Constructor Summary
Handler()
          Deprecated.  
 
Method Summary
protected  java.net.URLConnection openConnection(java.net.URL u)
          Deprecated. Open a multiplexed connection.
static void register(java.lang.String prefix, java.lang.Class<? extends java.net.URLConnection> connc)
          Deprecated. Register a URLConnection.
 
Methods inherited from class java.net.URLStreamHandler
equals, getDefaultPort, getHostAddress, hashCode, hostsEqual, openConnection, 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()
Deprecated. 
Method Detail

register

public static void register(java.lang.String prefix,
                            java.lang.Class<? extends java.net.URLConnection> connc)
                     throws java.lang.NoSuchMethodException
Deprecated. 
Register a URLConnection.

Parameters:
prefix - The path prefix, including the required leading slash. For example, supplying a prefix of /foo would cause URLs of the form mux:///foo/bar/baz.flonk to work; your URLConnection would recieve a URL with path /bar/baz.flonk for the example above.
connc - Your URLConnection subclass. It will be instantiated using the constructor which accepts a single URL.
Throws:
java.lang.NoSuchMethodException - If your class doesn't have this constructor.
java.lang.ClassCastException - If your class isn't a URLConnection.

openConnection

protected java.net.URLConnection openConnection(java.net.URL u)
                                         throws java.io.IOException
Deprecated. 
Open a multiplexed connection.

Specified by:
openConnection in class java.net.URLStreamHandler
Throws:
java.net.MalformedURLException - If the prefix is invalid.
java.io.IOException