Package org.osgi.service.url
Class AbstractURLStreamHandlerService
java.lang.Object
java.net.URLStreamHandler
org.osgi.service.url.AbstractURLStreamHandlerService
- All Implemented Interfaces:
URLStreamHandlerService
@ConsumerType
public abstract class AbstractURLStreamHandlerService
extends URLStreamHandler
implements URLStreamHandlerService
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.- Author:
- $Id: 79cfc45d97b037436d50bda26111109bd5d42a37 $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected URLStreamHandlerSetterTheURLStreamHandlerSetterobject passed to the parseURL method. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis method callssuper.equals(URL,URL).intThis method callssuper.getDefaultPort.This method callssuper.getHostAddress.intThis method callssuper.hashCode(URL).booleanhostsEqual(URL u1, URL u2) This method callssuper.hostsEqual.abstract URLConnectionvoidparseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit) Parse a URL using theURLStreamHandlerSetterobject.booleanThis method callssuper.sameFile.protected voidDeprecated.This method is only for compatibility with handlers written for JDK 1.1.protected voidsetURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref) This method callsrealHandler.setURL(URL,String,String,int,String,String,String,String).This method callssuper.toExternalForm.Methods inherited from class java.net.URLStreamHandler
openConnection, parseURL
-
Field Details
-
realHandler
TheURLStreamHandlerSetterobject passed to the parseURL method.
-
-
Constructor Details
-
AbstractURLStreamHandlerService
public AbstractURLStreamHandlerService()
-
-
Method Details
-
openConnection
- Specified by:
openConnectionin interfaceURLStreamHandlerService- Specified by:
openConnectionin classURLStreamHandler- Throws:
IOException- See Also:
-
parseURL
Parse a URL using theURLStreamHandlerSetterobject. This method sets therealHandlerfield with the specifiedURLStreamHandlerSetterobject and then callsparseURL(URL,String,int,int).- Specified by:
parseURLin interfaceURLStreamHandlerService- Parameters:
realHandler- The object on which thesetURLmethod must be invoked for the specified URL.- See Also:
-
toExternalForm
This method callssuper.toExternalForm.- Specified by:
toExternalFormin interfaceURLStreamHandlerService- Overrides:
toExternalFormin classURLStreamHandler- See Also:
-
equals
This method callssuper.equals(URL,URL).- Specified by:
equalsin interfaceURLStreamHandlerService- Overrides:
equalsin classURLStreamHandler- See Also:
-
getDefaultPort
public int getDefaultPort()This method callssuper.getDefaultPort.- Specified by:
getDefaultPortin interfaceURLStreamHandlerService- Overrides:
getDefaultPortin classURLStreamHandler- See Also:
-
getHostAddress
This method callssuper.getHostAddress.- Specified by:
getHostAddressin interfaceURLStreamHandlerService- Overrides:
getHostAddressin classURLStreamHandler- See Also:
-
hashCode
This method callssuper.hashCode(URL).- Specified by:
hashCodein interfaceURLStreamHandlerService- Overrides:
hashCodein classURLStreamHandler- See Also:
-
hostsEqual
This method callssuper.hostsEqual.- Specified by:
hostsEqualin interfaceURLStreamHandlerService- Overrides:
hostsEqualin classURLStreamHandler- See Also:
-
sameFile
This method callssuper.sameFile.- Specified by:
sameFilein interfaceURLStreamHandlerService- Overrides:
sameFilein classURLStreamHandler- See Also:
-
setURL
Deprecated.This method is only for compatibility with handlers written for JDK 1.1.This method callsrealHandler.setURL(URL,String,String,int,String,String).- Overrides:
setURLin classURLStreamHandler- See Also:
-
setURL
protected void setURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref) This method callsrealHandler.setURL(URL,String,String,int,String,String,String,String).- Overrides:
setURLin classURLStreamHandler- See Also:
-