public class Hoverfly
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
Hoverfly(HoverflyConfig hoverflyConfigBuilder,
HoverflyMode hoverflyMode)
Instantiates
Hoverfly |
Hoverfly(HoverflyMode hoverflyMode)
Instantiates
Hoverfly |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Stops the running
Hoverfly process and clean up resources |
void |
exportSimulation(java.nio.file.Path path)
Exports a simulation and stores it on the filesystem at the given path
|
HoverflyConfiguration |
getHoverflyConfig()
Gets the validated
HoverflyConfig object used by the current Hoverfly instance |
HoverflyInfoView |
getHoverflyInfo()
Gets configuration information from the running instance of Hoverfly.
|
HoverflyMode |
getMode()
Gets the currently activated Hoverfly mode
|
Simulation |
getSimulation()
Gets the simulation currently used by the running
Hoverfly instance |
SslConfigurer |
getSslConfigurer() |
void |
importSimulation(SimulationSource simulationSource)
Imports a simulation into
Hoverfly from a SimulationSource |
void |
reset()
Delete existing simulations and journals
|
void |
resetJournal()
Delete journal logs
|
void |
setDestination(java.lang.String destination)
Sets a new destination for the running instance of Hoverfly, overwriting the existing destination setting.
|
void |
setMode(HoverflyMode mode)
Changes the mode of the running instance of Hoverfly.
|
void |
start()
Adds Hoverfly SSL certificate to the trust store
Sets the proxy system properties to route through Hoverfly
Starts Hoverfly
|
void |
verify(RequestMatcherBuilder requestMatcher) |
void |
verify(RequestMatcherBuilder requestMatcher,
VerificationCriteria criteria) |
void |
verifyAll() |
void |
verifyZeroRequestTo(StubServiceBuilder requestedServiceBuilder) |
public Hoverfly(HoverflyConfig hoverflyConfigBuilder, HoverflyMode hoverflyMode)
HoverflyhoverflyConfigBuilder - the confighoverflyMode - the modepublic Hoverfly(HoverflyMode hoverflyMode)
HoverflyhoverflyMode - the modepublic void start()
public void close()
Hoverfly process and clean up resourcesclose in interface java.lang.AutoCloseablepublic void importSimulation(SimulationSource simulationSource)
Hoverfly from a SimulationSourcesimulationSource - the simulation to importpublic void reset()
public void resetJournal()
public void exportSimulation(java.nio.file.Path path)
path - the path on the filesystem to where the simulation should be storedpublic Simulation getSimulation()
Hoverfly instancepublic HoverflyInfoView getHoverflyInfo()
public void setDestination(java.lang.String destination)
destination - the destination setting to overridepublic void setMode(HoverflyMode mode)
mode - hoverfly mode to changepublic HoverflyConfiguration getHoverflyConfig()
HoverflyConfig object used by the current Hoverfly instancepublic HoverflyMode getMode()
public SslConfigurer getSslConfigurer()
public void verify(RequestMatcherBuilder requestMatcher, VerificationCriteria criteria)
public void verify(RequestMatcherBuilder requestMatcher)
public void verifyZeroRequestTo(StubServiceBuilder requestedServiceBuilder)
public void verifyAll()