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 Details

    • 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 place
      artifactId - - 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 only artifactId.
      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