All Downloads are FREE. Search and download functionalities are using the official Maven repository.

aQute.bnd.url.MultiURLConnectionHandler Maven / Gradle / Ivy

Go to download

A command line utility and Ant plugin to wrap, build, or examine bundles.

There is a newer version: 2.4.0
Show newest version
package aQute.bnd.url;

import java.net.*;

import aQute.bnd.service.*;
import aQute.bnd.service.url.*;

/**
 * Will iterate over the current plugins to find a matching URLConnectionHandler
 * and in the end use the default connector if no alternative is found.
 */
public class MultiURLConnectionHandler implements URLConnectionHandler {

	private Registry	registry;

	public MultiURLConnectionHandler(Registry registry) {
		this.registry = registry;
	}

	public void handle(URLConnection connection) throws Exception {
		for (URLConnectionHandler h : registry.getPlugins(URLConnectionHandler.class)) {
			h.handle(connection);
		}
	}

	public boolean matches(URL url) {
		return true;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy