Class FileStubDownloader
java.lang.Object
org.springframework.cloud.contract.stubrunner.FileStubDownloader
- All Implemented Interfaces:
StubDownloaderBuilder
,org.springframework.core.io.ProtocolResolver
Allows to read stubs and contracts from a given location. Contrary to
AetherStubDownloaderBuilder
,
doesn't require the location to be a maven repository.- Author:
- Marcin Grzejszczak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild
(StubRunnerOptions stubRunnerOptions) static boolean
isProtocolAccepted
(String url) Does any of the accepted protocols matches the URL of the repository.org.springframework.core.io.Resource
-
Constructor Details
-
FileStubDownloader
public FileStubDownloader()
-
-
Method Details
-
isProtocolAccepted
Does any of the accepted protocols matches the URL of the repository.- Parameters:
url
- - of the repository- Returns:
true
if protocol is accepted
-
build
- Specified by:
build
in interfaceStubDownloaderBuilder
- Parameters:
stubRunnerOptions
- options of Stub Runner- Returns:
StubDownloader
instance ofnull
if current parameters don't allow building the instance
-
resolve
public org.springframework.core.io.Resource resolve(String location, org.springframework.core.io.ResourceLoader resourceLoader) - Specified by:
resolve
in interfaceorg.springframework.core.io.ProtocolResolver
- Specified by:
resolve
in interfaceStubDownloaderBuilder
-