|
OSGi™ Core Release 5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.net.URLStreamHandler org.osgi.service.url.AbstractURLStreamHandlerService
public abstract class AbstractURLStreamHandlerService
Abstract implementation of the URLStreamHandlerService
interface. All
the methods simply invoke the corresponding methods on
java.net.URLStreamHandler
except for parseURL
and
setURL
, which use the URLStreamHandlerSetter
parameter.
Subclasses of this abstract class should not need to override the
setURL
and parseURL(URLStreamHandlerSetter,...)
methods.
Field Summary | |
---|---|
protected URLStreamHandlerSetter |
realHandler
The URLStreamHandlerSetter object passed to the parseURL method. |
Constructor Summary | |
---|---|
AbstractURLStreamHandlerService()
|
Method Summary | |
---|---|
boolean |
equals(java.net.URL u1,
java.net.URL u2)
This method calls super.equals(URL,URL) . |
int |
getDefaultPort()
This method calls super.getDefaultPort . |
java.net.InetAddress |
getHostAddress(java.net.URL u)
This method calls super.getHostAddress . |
int |
hashCode(java.net.URL u)
This method calls super.hashCode(URL) . |
boolean |
hostsEqual(java.net.URL u1,
java.net.URL u2)
This method calls super.hostsEqual . |
abstract 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 using the URLStreamHandlerSetter object. |
boolean |
sameFile(java.net.URL u1,
java.net.URL u2)
This method calls super.sameFile . |
protected void |
setURL(java.net.URL u,
java.lang.String proto,
java.lang.String host,
int port,
java.lang.String file,
java.lang.String ref)
Deprecated. This method is only for compatibility with handlers written for JDK 1.1. |
protected void |
setURL(java.net.URL u,
java.lang.String proto,
java.lang.String host,
int port,
java.lang.String auth,
java.lang.String user,
java.lang.String path,
java.lang.String query,
java.lang.String ref)
This method calls realHandler.setURL(URL,String,String,int,String,String,String,String)
. |
java.lang.String |
toExternalForm(java.net.URL u)
This method calls super.toExternalForm . |
Methods inherited from class java.net.URLStreamHandler |
---|
parseURL |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected volatile URLStreamHandlerSetter realHandler
URLStreamHandlerSetter
object passed to the parseURL method.
Constructor Detail |
---|
public AbstractURLStreamHandlerService()
Method Detail |
---|
public abstract java.net.URLConnection openConnection(java.net.URL u) throws java.io.IOException
openConnection
in interface URLStreamHandlerService
openConnection
in class java.net.URLStreamHandler
java.io.IOException
public void parseURL(URLStreamHandlerSetter realHandler, java.net.URL u, java.lang.String spec, int start, int limit)
URLStreamHandlerSetter
object. This method
sets the realHandler
field with the specified
URLStreamHandlerSetter
object and then calls
parseURL(URL,String,int,int)
.
parseURL
in interface URLStreamHandlerService
realHandler
- The object on which the setURL
method must be
invoked for the specified URL.public java.lang.String toExternalForm(java.net.URL u)
super.toExternalForm
.
toExternalForm
in interface URLStreamHandlerService
toExternalForm
in class java.net.URLStreamHandler
public boolean equals(java.net.URL u1, java.net.URL u2)
super.equals(URL,URL)
.
equals
in interface URLStreamHandlerService
equals
in class java.net.URLStreamHandler
public int getDefaultPort()
super.getDefaultPort
.
getDefaultPort
in interface URLStreamHandlerService
getDefaultPort
in class java.net.URLStreamHandler
public java.net.InetAddress getHostAddress(java.net.URL u)
super.getHostAddress
.
getHostAddress
in interface URLStreamHandlerService
getHostAddress
in class java.net.URLStreamHandler
public int hashCode(java.net.URL u)
super.hashCode(URL)
.
hashCode
in interface URLStreamHandlerService
hashCode
in class java.net.URLStreamHandler
public boolean hostsEqual(java.net.URL u1, java.net.URL u2)
super.hostsEqual
.
hostsEqual
in interface URLStreamHandlerService
hostsEqual
in class java.net.URLStreamHandler
public boolean sameFile(java.net.URL u1, java.net.URL u2)
super.sameFile
.
sameFile
in interface URLStreamHandlerService
sameFile
in class java.net.URLStreamHandler
protected void setURL(java.net.URL u, java.lang.String proto, java.lang.String host, int port, java.lang.String file, java.lang.String ref)
realHandler.setURL(URL,String,String,int,String,String)
.
protected void setURL(java.net.URL u, java.lang.String proto, java.lang.String host, int port, java.lang.String auth, java.lang.String user, java.lang.String path, java.lang.String query, java.lang.String ref)
realHandler.setURL(URL,String,String,int,String,String,String,String)
.
setURL
in class java.net.URLStreamHandler
|
OSGi™ Core Release 5 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |