package aQute.bnd.service.url;

import java.net.*;

/**
 * This interface is used to sign urls, set options, etc. Anybody that interacts
 * with a URL should allow all the {@link URLConnectionHandler} plugins to
 * interact with the URLConnection. There are a number of known implementations:
 * <ul> <li>{@link BndAuthentication} — Authenticates using bnd's built in
 * private key (see {@link Settings} <li>{@link BasicAuthentication} — Http
 * Basic Authentication <li>{@link HttpsVerification} — Can add certificats for
 * verification of Https or disable verification <li>{@link ConnectionSettings}
 * — Can set arbitrary headers on an Http(s) connection </ul> URLConnection are
 * allows matched to the URL. This {@link URLConnectionHandler#MATCH} is a comma
 * separated list of Glob expressions that must match the canonical URL string
 * representation.
 */
public interface URLConnectionHandler {

	/**
	 * Configuration property for the matcher. A comma separated list of {@link
	 * Glob} expressions. If no match is given, all URLs match.
	 */
	String MATCH = "match";

	/**
	 * If the corresponding URL matches, modify the connection in the
	 * parameterized way. @param connection The connection to modify @throws
	 * Exception
	 */
	void handle(URLConnection connection) throws Exception;

	/**
	 * Answer if this handler matches the given URL @param url the url to
	 * match @return true if matched, false if not.
	 */
	boolean matches(URL url);
}

@@ -41,17 +41,87 @@
 ava.net.
-*
+URL;%0Aimport java.net.URLConnection;%0A%0Aimport aQute.lib.settings.Settings
 ;%0A%0A/**%0A 
@@ -363,16 +363,19 @@
 %0A * %3Cul%3E
+%0A *
  %3Cli%3E%7B@l
@@ -378,16 +378,48 @@
 %3E%7B@link 
+aQute.bnd.url.BndAuthentication 
 BndAuthe
@@ -444,16 +444,19 @@
 nticates
+%0A *
  using b
@@ -468,19 +468,16 @@
 built in
-%0A *
  private
@@ -502,16 +502,19 @@
 ettings%7D
+%0A *
  %3Cli%3E%7B@l
@@ -517,16 +517,50 @@
 %3E%7B@link 
+aQute.bnd.url.BasicAuthentication 
 BasicAut
@@ -598,24 +598,27 @@
 thentication
+%0A *
  %3Cli%3E%7B@link 
@@ -617,16 +617,48 @@
 %3E%7B@link 
+aQute.bnd.url.HttpsVerification 
 HttpsVer
@@ -677,16 +677,19 @@
  Can add
+%0A *
  certifi
@@ -696,19 +696,16 @@
 cats for
-%0A *
  verific
@@ -742,16 +742,19 @@
 fication
+%0A *
  %3Cli%3E%7B@l
@@ -757,16 +757,30 @@
 %3E%7B@link 
+aQute.bnd.url.
 Connecti
@@ -789,20 +789,36 @@
 Settings
-%7D%0A *
+ ConnectionSettings%7D
  %E2%80%94 Can s
@@ -819,16 +819,19 @@
  Can set
+%0A *
  arbitra
@@ -869,14 +869,20 @@
 tion
+%0A *
  %3C/ul%3E
+%0A *
  URL
@@ -895,19 +895,16 @@
 tion are
-%0A *
  allows 
@@ -927,16 +927,19 @@
 RL. This
+%0A *
  %7B@link 
@@ -976,19 +976,16 @@
  a comma
-%0A *
  separat
@@ -999,16 +999,19 @@
  of Glob
+%0A *
  express
@@ -1055,19 +1055,16 @@
 L string
-%0A *
  represe
@@ -1195,19 +1195,40 @@
 t of
+%0A%09 *
  %7B@link
-%0A%09 *
+ aQute.libg.glob.Glob
  Glo
@@ -1268,16 +1268,20 @@
 ven, all
+%0A%09 *
  URLs ma

Fix javadoc warnings.