OSGi™ Service Platform
Release 4 Version 4.1

org.osgi.service.url
Interface URLStreamHandlerService

All Known Implementing Classes:
AbstractURLStreamHandlerService

public interface URLStreamHandlerService

Service interface with public versions of the protected java.net.URLStreamHandler methods.

The important differences between this interface and the URLStreamHandler class are that the setURL method is absent and the parseURL method takes a URLStreamHandlerSetter object as the first argument. Classes implementing this interface must call the setURL method on the URLStreamHandlerSetter object received in the parseURL method instead of URLStreamHandler.setURL to avoid a SecurityException.

See Also:
AbstractURLStreamHandlerService

Method Summary
 boolean equals(java.net.URL u1, java.net.URL u2)
           
 int getDefaultPort()
           
 java.net.InetAddress getHostAddress(java.net.URL u)
           
 int hashCode(java.net.URL u)
           
 boolean hostsEqual(java.net.URL u1, java.net.URL u2)
           
 java.net.URLConnection openConnection(java.net.URL u)
           
 void parseURL(URLStreamHandlerSetter realHandler, java.net.URL u, java.lang.String spec, int start, int limit)
          Parse a URL.
 boolean sameFile(java.net.URL u1, java.net.URL u2)
           
 java.lang.String toExternalForm(java.net.URL u)
           
 

Method Detail

openConnection

public java.net.URLConnection openConnection(java.net.URL u)
                                      throws java.io.IOException
Throws:
java.io.IOException
See Also:
"java.net.URLStreamHandler.openConnection"

parseURL

public void parseURL(URLStreamHandlerSetter realHandler,
                     java.net.URL u,
                     java.lang.String spec,
                     int start,
                     int limit)
Parse a URL. This method is called by the URLStreamHandler proxy, instead of java.net.URLStreamHandler.parseURL, passing a URLStreamHandlerSetter object.

Parameters:
realHandler - The object on which setURL must be invoked for this URL.
See Also:
"java.net.URLStreamHandler.parseURL"

toExternalForm

public java.lang.String toExternalForm(java.net.URL u)
See Also:
"java.net.URLStreamHandler.toExternalForm"

equals

public boolean equals(java.net.URL u1,
                      java.net.URL u2)
See Also:
"java.net.URLStreamHandler.equals(URL, URL)"

getDefaultPort

public int getDefaultPort()
See Also:
"java.net.URLStreamHandler.getDefaultPort"

getHostAddress

public java.net.InetAddress getHostAddress(java.net.URL u)
See Also:
"java.net.URLStreamHandler.getHostAddress"

hashCode

public int hashCode(java.net.URL u)
See Also:
"java.net.URLStreamHandler.hashCode(URL)"

hostsEqual

public boolean hostsEqual(java.net.URL u1,
                          java.net.URL u2)
See Also:
"java.net.URLStreamHandler.hostsEqual"

sameFile

public boolean sameFile(java.net.URL u1,
                        java.net.URL u2)
See Also:
"java.net.URLStreamHandler.sameFile"

OSGi™ Service Platform
Release 4 Version 4.1

Copyright © OSGi Alliance (2000, 2007). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0