Interface StubFinder
- All Superinterfaces:
StubTrigger
- All Known Subinterfaces:
StubRunning
- All Known Implementing Classes:
BatchStubRunner,StubRunner,StubRunnerExtension,StubRunnerExtension.PortStubRunnerExtension,StubRunnerRule,StubRunnerRule.PortStubRunnerRule
Contract for finding registered stubs.
- Author:
- Marcin Grzejszczak
-
Method Summary
Modifier and TypeMethodDescriptionfindStubUrl(String ivyNotation) For the given Ivy notation[groupId]:artifactId:[version]:[classifier]tries to find the matching URL of the running stub.findStubUrl(String groupId, String artifactId) For the given groupId and artifactId tries to find the matching URL of the running stub.Map<StubConfiguration,Collection<org.springframework.cloud.contract.spec.Contract>> Methods inherited from interface org.springframework.cloud.contract.stubrunner.StubTrigger
labels, trigger, trigger, trigger
-
Method Details
-
findStubUrl
For the given groupId and artifactId tries to find the matching URL of the running stub.- Parameters:
groupId- - might be null. In that case a search only via artifactId takes placeartifactId- - artifact id of the stub- Returns:
- URL of a running stub or throws exception if not found
- Throws:
StubNotFoundException- in case of not finding a stub
-
findStubUrl
For the given Ivy notation[groupId]:artifactId:[version]:[classifier]tries to find the matching URL of the running stub. You can also pass onlyartifactId.- Parameters:
ivyNotation- - Ivy representation of the Maven artifact- Returns:
- URL of a running stub or throws exception if not found
- Throws:
StubNotFoundException- in case of not finding a stub
-
findAllRunningStubs
RunningStubs findAllRunningStubs()- Returns:
- all running stubs
-
getContracts
Map<StubConfiguration,Collection<org.springframework.cloud.contract.spec.Contract>> getContracts()- Returns:
- the list of Contracts
-