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.-
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.This method callssuper.toExternalForm.
-
Constructor Details
-
AbstractURLStreamHandlerService
public AbstractURLStreamHandlerService()
-
-
Method Details
-
openConnection
- Specified by:
openConnectionin interfaceURLStreamHandlerService- 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- See Also:
-
equals
This method callssuper.equals(URL,URL).- Specified by:
equalsin interfaceURLStreamHandlerService- See Also:
-
getDefaultPort
public int getDefaultPort()This method callssuper.getDefaultPort.- Specified by:
getDefaultPortin interfaceURLStreamHandlerService- See Also:
-
getHostAddress
This method callssuper.getHostAddress.- Specified by:
getHostAddressin interfaceURLStreamHandlerService- See Also:
-
hashCode
This method callssuper.hashCode(URL).- Specified by:
hashCodein interfaceURLStreamHandlerService- See Also:
-
hostsEqual
This method callssuper.hostsEqual.- Specified by:
hostsEqualin interfaceURLStreamHandlerService- See Also:
-
sameFile
This method callssuper.sameFile.- Specified by:
sameFilein interfaceURLStreamHandlerService- See Also:
-