com.ccg.net.tcp
Class Handler
java.lang.Object
java.net.URLStreamHandler
com.ccg.net.tcp.Handler
public class Handler
- extends URLStreamHandler
A URLStreamHandler to handle the "tcp:" protocol.
This class provides the necessary handler information to the JVM so that it can recognize the
"tcp://[HOST]:PORT/OPTIONS" URL which the URLConnection class supports.
This class simply implements the openConnection method such that it will return a new TCP URL object.
In order for this type of URL to be recognized, the string
"com.ccg.net" must be added to the system property:
"java.protocol.handler.pkgs". This can be done (and is explained)
by the URLConnection class.
- Since:
- 1.0
- Version:
- $Revision: 1.2 $
- Author:
- $Author: pkb $
- See Also:
URLStreamHandler
| 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 |
Handler
public Handler()
openConnection
public URLConnection openConnection(URL url)
throws IOException
- Attempt to create a
URLConnection.
This method attempts to create a URLConnection from the URL
specified.
- Specified by:
openConnection in class URLStreamHandler
- Parameters:
url - The URL to parse.
- Returns:
- A raw TCP based connection.
- Throws:
IOException - If there is a problem creating the URLConnection object from
the URL passed.- Since:
- 1.0
- See Also:
URLStreamHandler.openConnection(java.net.URL)
Copyright 1998-1998-2006 null. All Rights Reserved.