public class StubRunner extends Object implements StubRunning
Constructor and Description |
---|
StubRunner(StubRunnerOptions stubRunnerOptions,
String repositoryPath,
StubConfiguration stubsConfiguration) |
StubRunner(StubRunnerOptions stubRunnerOptions,
String repositoryPath,
StubConfiguration stubsConfiguration,
MessageVerifier<?> contractVerifierMessaging) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
RunningStubs |
findAllRunningStubs() |
URL |
findStubUrl(String ivyNotation)
For the given Ivy notation
[groupId]:artifactId:[version]:[classifier]
tries to find the matching URL of the running stub. |
URL |
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>> |
getContracts() |
Map<String,Collection<String>> |
labels()
Feature related to messaging.
|
RunningStubs |
runStubs() |
boolean |
trigger()
Triggers all possible events.
|
boolean |
trigger(String labelName)
Triggers an event by a given label.
|
boolean |
trigger(String ivyNotation,
String labelName)
Triggers an event by a given label for a given
groupid:artifactid notation. |
public StubRunner(StubRunnerOptions stubRunnerOptions, String repositoryPath, StubConfiguration stubsConfiguration)
public StubRunner(StubRunnerOptions stubRunnerOptions, String repositoryPath, StubConfiguration stubsConfiguration, MessageVerifier<?> contractVerifierMessaging)
public RunningStubs runStubs()
runStubs
in interface StubRunning
RunningStubs
. If the stubs were
already started then a cached version will be returned.public URL findStubUrl(String groupId, String artifactId)
StubFinder
findStubUrl
in interface StubFinder
groupId
- - might be null. In that case a search only via artifactId takes
placeartifactId
- - artifact id of the stubpublic URL findStubUrl(String ivyNotation)
StubFinder
[groupId]:artifactId:[version]:[classifier]
tries to find the matching URL of the running stub. You can also pass only
artifactId
.findStubUrl
in interface StubFinder
ivyNotation
- - Ivy representation of the Maven artifactpublic RunningStubs findAllRunningStubs()
findAllRunningStubs
in interface StubFinder
public Map<StubConfiguration,Collection<org.springframework.cloud.contract.spec.Contract>> getContracts()
getContracts
in interface StubFinder
public boolean trigger(String ivyNotation, String labelName)
StubTrigger
groupid:artifactid
notation.
You can use only artifactId
too.
Feature related to messaging.trigger
in interface StubTrigger
ivyNotation
- ivy notation of a stublabelName
- name of the label to triggerpublic boolean trigger(String labelName)
StubTrigger
trigger
in interface StubTrigger
labelName
- name of the label to triggerpublic boolean trigger()
StubTrigger
trigger
in interface StubTrigger
public Map<String,Collection<String>> labels()
StubTrigger
labels
in interface StubTrigger
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2016–2019 Spring. All rights reserved.