Interface StubFinder
-
- All Superinterfaces:
StubTrigger
- All Known Subinterfaces:
StubRunning
- All Known Implementing Classes:
BatchStubRunner,StubRunner,StubRunnerExtension,StubRunnerExtension.PortStubRunnerExtension,StubRunnerRule,StubRunnerRule.PortStubRunnerRule
public interface StubFinder extends StubTrigger
Contract for finding registered stubs.- Author:
- Marcin Grzejszczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RunningStubsfindAllRunningStubs()URLfindStubUrl(String ivyNotation)For the given Ivy notation[groupId]:artifactId:[version]:[classifier]tries to find the matching URL of the running stub.URLfindStubUrl(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>>getContracts()-
Methods inherited from interface org.springframework.cloud.contract.stubrunner.StubTrigger
labels, trigger, trigger, trigger
-
-
-
-
Method Detail
-
findStubUrl
URL findStubUrl(String groupId, String artifactId) throws StubNotFoundException
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
URL findStubUrl(String ivyNotation) throws StubNotFoundException
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
-
-