public class Hoverfly
extends java.lang.Object
implements java.lang.AutoCloseable
| Constructor and Description |
|---|
Hoverfly(HoverflyConfig hoverflyConfig,
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
|
HoverflyConfig |
getHoverflyConfig()
Gets the validated
HoverflyConfig object used by the current Hoverfly instance |
HoverflyInfo |
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 |
void |
importSimulation(SimulationSource simulationSource)
Imports a simulation into
Hoverfly from a SimulationSource |
void |
reset()
Clears Hoverfly instance in case of running Hoverfly in standalone.
|
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
|
public Hoverfly(HoverflyConfig hoverflyConfig, HoverflyMode hoverflyMode)
HoverflyhoverflyConfig - 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 exportSimulation(java.nio.file.Path path)
path - the path on the filesystem to where the simulation should be storedpublic Simulation getSimulation()
Hoverfly instancepublic HoverflyInfo getHoverflyInfo()
public void setDestination(java.lang.String destination)
destination - the destination setting to overridepublic void setMode(HoverflyMode mode)
mode - hoverfly mode to changepublic HoverflyConfig getHoverflyConfig()
HoverflyConfig object used by the current Hoverfly instancepublic HoverflyMode getMode()