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 booleanisProtocolAccepted(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:
trueif protocol is accepted
-
build
- Specified by:
buildin interfaceStubDownloaderBuilder- Parameters:
stubRunnerOptions- options of Stub Runner- Returns:
StubDownloaderinstance ofnullif 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:
resolvein interfaceorg.springframework.core.io.ProtocolResolver- Specified by:
resolvein interfaceStubDownloaderBuilder
-