Package aQute.bnd.service.url
Interface URLConnectionHandler
- All Known Implementing Classes:
BasicAuthentication
,BearerAuthentication
,BndAuthentication
,ConnectionSettings
,ConnectionSettings.SettingsURLConnectionHandler
,DefaultURLConnectionHandler
,HttpsVerification
,MultiURLConnectionHandler
public interface URLConnectionHandler
This interface is used to sign urls, set options, etc. Anybody that interacts
with a URL should allow all the
URLConnectionHandler
plugins to
interact with the URLConnection. There are a number of known implementations:
BndAuthentication
— Authenticates using bnd's built in private key (seeSettings
BasicAuthentication
— Http Basic AuthenticationHttpsVerification
— Can add certificats for verification of Https or disable verificationConnectionSettings
— Can set arbitrary headers on an Http(s) connection
MATCH
is a comma separated list of Glob
expressions that must match the canonical URL string representation.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoid
handle
(URLConnection connection) If the corresponding URL matches, modify the connection in the parameterized way.boolean
Answer if this handler matches the given URLdefault int
Limit the number of concurrent connections for this handler.
-
Field Details
-
MATCH
Configuration property for the matcher. A comma separated list ofGlob
expressions. If no match is given, all URLs match.- See Also:
-
-
Method Details
-
handle
If the corresponding URL matches, modify the connection in the parameterized way.- Parameters:
connection
- The connection to modify- Throws:
Exception
-
matches
Answer if this handler matches the given URL- Parameters:
url
- the url to match- Returns:
- true if matched, false if not.
-
maxConcurrentConnections
default int maxConcurrentConnections()Limit the number of concurrent connections for this handler. If this returns 0, there is no limit.- Returns:
- the number of max concurrent connections or 0 for no limit
-