public abstract class HoverflyConfig
extends java.lang.Object
Hoverfly| Modifier and Type | Field and Description |
|---|---|
protected int |
adminPort |
protected java.util.List<java.lang.String> |
captureHeaders |
protected java.lang.String |
destination |
protected boolean |
incrementalCapture |
protected java.lang.String |
proxyCaCert |
protected boolean |
proxyLocalHost |
protected int |
proxyPort |
protected SimulationPreprocessor |
simulationPreprocessor |
protected boolean |
statefulCapture |
protected boolean |
webServer |
| Constructor and Description |
|---|
HoverflyConfig() |
| Modifier and Type | Method and Description |
|---|---|
HoverflyConfig |
adminPort(int adminPort)
Sets the admin port for
Hoverfly |
HoverflyConfig |
asWebServer() |
abstract HoverflyConfiguration |
build()
Validate and build
HoverflyConfiguration |
HoverflyConfig |
captureAllHeaders()
Set to capture all request headers
|
HoverflyConfig |
captureHeaders(java.lang.String... headers)
Specifies which request headers to capture
|
static LocalHoverflyConfig |
configs()
Deprecated.
use
localConfigs() |
HoverflyConfig |
destination(java.lang.String destination)
Sets destination filter to what target urls to simulate or capture
|
HoverflyConfig |
enableIncrementalCapture()
By default Hoverfly exports the captured requests and responses to a new file by replacing any existing one.
|
HoverflyConfig |
enableStatefulCapture()
By default Hoverfly captures multiple identical requests once only, enable to capture all requests sequentially
|
static LocalHoverflyConfig |
localConfigs()
Creates a new instance of
LocalHoverflyConfig |
HoverflyConfig |
proxyCaCert(java.lang.String proxyCaCert)
Set proxy CA certificate to validate the authenticity of a Hoverfly instance.
|
HoverflyConfig |
proxyLocalHost()
Invoke to enable proxying of localhost requests
By default it is false
|
HoverflyConfig |
proxyLocalHost(boolean proxyLocalHost)
Deprecated.
|
HoverflyConfig |
proxyPort(int proxyPort)
Sets the proxy port for
Hoverfly |
RemoteHoverflyConfig |
remote()
Deprecated.
use
remoteConfigs() |
static RemoteHoverflyConfig |
remoteConfigs()
Creates a new instance of
RemoteHoverflyConfig |
HoverflyConfig |
simulationPreprocessor(SimulationPreprocessor simulationPreprocessor)
Provides the ability to pre-process the mutable
Simulation instance
prior to handing it over to the Hoverfly client. |
protected int proxyPort
protected int adminPort
protected boolean proxyLocalHost
protected java.lang.String destination
protected java.lang.String proxyCaCert
protected java.util.List<java.lang.String> captureHeaders
protected boolean webServer
protected boolean statefulCapture
protected boolean incrementalCapture
protected SimulationPreprocessor simulationPreprocessor
@Deprecated public static LocalHoverflyConfig configs()
localConfigs()LocalHoverflyConfig implementationpublic static LocalHoverflyConfig localConfigs()
LocalHoverflyConfigLocalHoverflyConfigpublic static RemoteHoverflyConfig remoteConfigs()
RemoteHoverflyConfigRemoteHoverflyConfigpublic HoverflyConfig adminPort(int adminPort)
HoverflyadminPort - the admin portHoverflyConfig for further customizationspublic HoverflyConfig proxyPort(int proxyPort)
HoverflyproxyPort - the proxy portHoverflyConfig for further customizationspublic HoverflyConfig destination(java.lang.String destination)
destination - the destination filterHoverflyConfig for further customizations@Deprecated public HoverflyConfig proxyLocalHost(boolean proxyLocalHost)
Hoverfly.proxyLocalHost - true if you want to proxy requests through localhostHoverflyConfig for further customizationspublic HoverflyConfig proxyLocalHost()
public HoverflyConfig captureHeaders(java.lang.String... headers)
headers - an array of header namesHoverflyConfig for further customizationspublic HoverflyConfig captureAllHeaders()
HoverflyConfig for further customizationspublic HoverflyConfig enableStatefulCapture()
HoverflyConfig for further customizationspublic HoverflyConfig enableIncrementalCapture()
HoverflyConfig for further customizationspublic HoverflyConfig proxyCaCert(java.lang.String proxyCaCert)
proxyCaCert - the path for the PEM encoded certificate relative to classpathHoverflyConfig for further customizationspublic HoverflyConfig asWebServer()
@Deprecated public RemoteHoverflyConfig remote()
remoteConfigs()RemoteHoverflyConfig implementationpublic HoverflyConfig simulationPreprocessor(SimulationPreprocessor simulationPreprocessor)
Simulation instance
prior to handing it over to the Hoverfly client.simulationPreprocessor - pre-processorHoverflyConfig for further customizationspublic abstract HoverflyConfiguration build()
HoverflyConfiguration