Interface Fetcher
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Fetches the bytes at a URI — the network seam for
DriverDownloader.
Abstracting the fetch lets tests supply canned bytes without touching the network. It also keeps the engine off the network entirely: this interface is the whole of what the engine knows about downloading, and every implementation of it — the production HTTPS one included — ships outside the engine, with the connectors. A caller that wants to download supplies the fetcher; a caller that does not, cannot.
- See Also:
-
Method Summary
-
Method Details
-
fetch
- Parameters:
uri- the resource to fetch- Returns:
- the resource bytes
- Throws:
IOException- if the fetch fails or returns a non-200 status
-