Package org.hl7.fhir.utilities.npm
Class CachingPackageClient
- java.lang.Object
-
- org.hl7.fhir.utilities.npm.PackageClient
-
- org.hl7.fhir.utilities.npm.CachingPackageClient
-
public class CachingPackageClient extends PackageClient
Implementation of a package client that keeps a local disk cache of downloaded artifacts in order to avoid re-downloading things
-
-
Field Summary
-
Fields inherited from class org.hl7.fhir.utilities.npm.PackageClient
PRIMARY_SERVER, SECONDARY_SERVER
-
-
Constructor Summary
Constructors Constructor Description CachingPackageClient(String address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists(String id, String ver)InputStreamfetchCached(String url)DategetNewPackages(Date lastCalled, List<PackageInfo> updates)-
Methods inherited from class org.hl7.fhir.utilities.npm.PackageClient
fetch, fetch, fetchNpm, fn, getLatestVersion, getLatestVersion, getVersions, listFromRegistry, search, url
-
-
-
-
Constructor Detail
-
CachingPackageClient
public CachingPackageClient(String address)
-
-
Method Detail
-
exists
public boolean exists(String id, String ver) throws IOException
- Overrides:
existsin classPackageClient- Throws:
IOException
-
fetchCached
public InputStream fetchCached(String url) throws IOException
- Overrides:
fetchCachedin classPackageClient- Throws:
IOException
-
getNewPackages
public Date getNewPackages(Date lastCalled, List<PackageInfo> updates)
- Overrides:
getNewPackagesin classPackageClient
-
-