Package aQute.bnd.service.url
Interface URLConnectionHandler
-
- All Known Implementing Classes:
BasicAuthentication,BearerAuthentication,BndAuthentication,ConnectionSettings,ConnectionSettings.SettingsURLConnectionHandler,DefaultURLConnectionHandler,HttpsVerification,MultiURLConnectionHandler
public interface URLConnectionHandlerThis interface is used to sign urls, set options, etc. Anybody that interacts with a URL should allow all theURLConnectionHandlerplugins to interact with the URLConnection. There are a number of known implementations:BndAuthentication— Authenticates using bnd's built in private key (seeSettingsBasicAuthentication— Http Basic AuthenticationHttpsVerification— Can add certificats for verification of Https or disable verificationConnectionSettings— Can set arbitrary headers on an Http(s) connection
MATCHis a comma separated list of Glob expressions that must match the canonical URL string representation.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringMATCHConfiguration property for the matcher.
-
Method Summary
All Methods Instance Methods Abstract 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
-
MATCH
static final java.lang.String MATCH
Configuration property for the matcher. A comma separated list ofGlobexpressions. If no match is given, all URLs match.- See Also:
- Constant Field Values
-
-
Method Detail
-
handle
void handle(java.net.URLConnection connection) throws java.lang.ExceptionIf the corresponding URL matches, modify the connection in the parameterized way.- Parameters:
connection- The connection to modify- Throws:
java.lang.Exception
-
matches
boolean matches(java.net.URL url)
Answer if this handler matches the given URL- Parameters:
url- the url to match- Returns:
- true if matched, false if not.
-
-