Package aQute.bnd.url
Class MultiURLConnectionHandler
- java.lang.Object
-
- aQute.bnd.url.MultiURLConnectionHandler
-
- All Implemented Interfaces:
URLConnectionHandler
public class MultiURLConnectionHandler extends java.lang.Object implements URLConnectionHandler
Will iterate over the current plugins to find a matching URLConnectionHandler and in the end use the default connector if no alternative is found.
-
-
Field Summary
Fields Modifier and Type Field Description private Registryregistry-
Fields inherited from interface aQute.bnd.service.url.URLConnectionHandler
MATCH
-
-
Constructor Summary
Constructors Constructor Description MultiURLConnectionHandler(Registry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandle(java.net.URLConnection connection)If the corresponding URL matches, modify the connection in the parameterized way.booleanmatches(java.net.URL url)Answer if this handler matches the given URL
-
-
-
Field Detail
-
registry
private Registry registry
-
-
Constructor Detail
-
MultiURLConnectionHandler
public MultiURLConnectionHandler(Registry registry)
-
-
Method Detail
-
handle
public void handle(java.net.URLConnection connection) throws java.lang.ExceptionDescription copied from interface:URLConnectionHandlerIf the corresponding URL matches, modify the connection in the parameterized way.- Specified by:
handlein interfaceURLConnectionHandler- Parameters:
connection- The connection to modify- Throws:
java.lang.Exception
-
matches
public boolean matches(java.net.URL url)
Description copied from interface:URLConnectionHandlerAnswer if this handler matches the given URL- Specified by:
matchesin interfaceURLConnectionHandler- Parameters:
url- the url to match- Returns:
- true if matched, false if not.
-
-