public class BatchStubRunner extends Object implements StubRunning
StubRunner
instances.StubRunner
Constructor and Description |
---|
BatchStubRunner(Iterable<StubRunner> stubRunners) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
RunningStubs |
findAllRunningStubs()
Returns all running stubs
|
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()
Returns the list of Contracts
|
Map<String,Collection<String>> |
labels()
Returns a mapping of ivy notation of a dependency to all the labels it has.
|
RunningStubs |
runStubs()
Runs the stubs and returns the
RunningStubs . |
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 BatchStubRunner(Iterable<StubRunner> stubRunners)
public RunningStubs runStubs()
StubRunning
RunningStubs
. If the stubs were
already started then a cached version will be returned.runStubs
in interface StubRunning
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 placepublic 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()
StubFinder
findAllRunningStubs
in interface StubFinder
public Map<StubConfiguration,Collection<org.springframework.cloud.contract.spec.Contract>> getContracts()
StubFinder
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
public boolean trigger(String labelName)
StubTrigger
trigger
in interface StubTrigger
public 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–2018 Spring. All rights reserved.