public class LocalHoverflyConfig extends HoverflyConfig
Hoverfly
managed internallyadminPort, captureHeaders, destination, incrementalCapture, proxyCaCert, proxyLocalHost, proxyPort, simulationPreprocessor, statefulCapture, webServer
Constructor and Description |
---|
LocalHoverflyConfig() |
Modifier and Type | Method and Description |
---|---|
LocalHoverflyConfig |
addCommands(java.lang.String... commands)
Set additional commands for starting Hoverfly.
|
HoverflyConfig |
binaryLocation(java.lang.String binaryLocation)
Overrides the default path for Hoverfly binary and working directory.
|
HoverflyConfiguration |
build()
Validate and build
HoverflyConfiguration |
LocalHoverflyConfig |
clientAuthCaCertPath(java.lang.String clientCaCertPath)
Set client CA certificate for mutual TLS authentication
|
LocalHoverflyConfig |
disableTlsVerification()
Configure Hoverfly to skip TLS verification.
|
LocalHoverflyConfig |
enableClientAuth(java.lang.String clientCertPath,
java.lang.String clientKeyPath,
java.lang.String... destinations)
Set client certificate and key for mutual TLS authentication with target server
|
LocalHoverflyConfig |
localMiddleware(java.lang.String binary,
java.lang.String path)
Sets the middleware for Hoverfly
|
LocalHoverflyConfig |
logger(java.lang.String loggerName)
Set the name of the logger to use when logging the output of the Hoverfly binary.
|
LocalHoverflyConfig |
logLevel(LogLevel logLevel)
Set the log level of Hoverfly.
|
LocalHoverflyConfig |
logToStdOut()
Change the Hoverfly binary to output directly to
System.out . |
LocalHoverflyConfig |
overrideDefaultCaCert(java.lang.String certPath,
java.lang.String keyPath)
Sets the certificate and key files to override the default Hoverfly's CA cert
|
LocalHoverflyConfig |
plainHttpTunneling()
Invoke to enable plain http tunneling
By default it is false
|
LocalHoverflyConfig |
sslCertificatePath(java.lang.String sslCertificatePath)
Deprecated.
|
LocalHoverflyConfig |
sslKeyPath(java.lang.String sslKeyPath)
Deprecated.
|
LocalHoverflyConfig |
upstreamProxy(java.net.InetSocketAddress proxyAddress)
Set upstream proxy for hoverfly to connect to target host
|
LocalHoverflyConfig |
upstreamProxy(java.lang.String upstreamProxy) |
adminPort, asWebServer, captureAllHeaders, captureHeaders, configs, destination, enableIncrementalCapture, enableStatefulCapture, localConfigs, proxyCaCert, proxyLocalHost, proxyLocalHost, proxyPort, remote, remoteConfigs, simulationPreprocessor
@Deprecated public LocalHoverflyConfig sslCertificatePath(java.lang.String sslCertificatePath)
sslCertificatePath
- certificate file in classpathLocalHoverflyConfig
for further customizations@Deprecated public LocalHoverflyConfig sslKeyPath(java.lang.String sslKeyPath)
sslKeyPath
- key file in classpathLocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig overrideDefaultCaCert(java.lang.String certPath, java.lang.String keyPath)
certPath
- certificate file in classpath. Must be a PEM encoded certificate, with .crt or .pem extensionskeyPath
- key file in classpath. Must be any PEM encoded key, with .key or .pem extensionsLocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig localMiddleware(java.lang.String binary, java.lang.String path)
binary
- absolute or relative path of binarypath
- middleware script file in classpathLocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig disableTlsVerification()
LocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig plainHttpTunneling()
public LocalHoverflyConfig upstreamProxy(java.net.InetSocketAddress proxyAddress)
proxyAddress
- socket address of the upstream proxy, eg. 127.0.0.1:8500LocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig upstreamProxy(java.lang.String upstreamProxy)
public LocalHoverflyConfig logger(java.lang.String loggerName)
loggerName
- Name of the logger to use when logging the output of the Hoverfly binary.LocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig logToStdOut()
System.out
.LocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig logLevel(LogLevel logLevel)
logLevel
- LogLevel
to setLocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig addCommands(java.lang.String... commands)
commands
- More Hoverfly command flags.LocalHoverflyConfig
for further customizationspublic HoverflyConfig binaryLocation(java.lang.String binaryLocation)
binaryLocation
- absolute path for the Hoverfly working directoryLocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig enableClientAuth(java.lang.String clientCertPath, java.lang.String clientKeyPath, java.lang.String... destinations)
clientCertPath
- certificate file in classpath. Must be a PEM encoded certificate, with .crt or .pem extensionsclientKeyPath
- key file in classpath. Must be unencrypted and PEM encoded key, with .key or .pem extensionsdestinations
- the destination filter to what target urls to enable mutual TLS authentication. Enable for all remote hosts if not provided.LocalHoverflyConfig
for further customizationspublic LocalHoverflyConfig clientAuthCaCertPath(java.lang.String clientCaCertPath)
clientCaCertPath
- CA certificate file in classpath. Must be any PEM encoded certificate, with .crt or .pem extensionsLocalHoverflyConfig
for further customizationspublic HoverflyConfiguration build()
HoverflyConfig
HoverflyConfiguration
build
in class HoverflyConfig