Package org.mockserver.configuration
Class ConfigurationProperties
- java.lang.Object
-
- org.mockserver.configuration.ConfigurationProperties
-
public class ConfigurationProperties extends Object
- Author:
- jamesdbloom
-
-
Constructor Summary
Constructors Constructor Description ConfigurationProperties()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static voidaddSslSubjectAlternativeNameDomains(String... additionalSubjectAlternativeNameDomains)static voidaddSslSubjectAlternativeNameIps(String... additionalSubjectAlternativeNameIps)static StringcertificateAuthorityCertificate()static voidcertificateAuthorityCertificate(String certificateAuthorityCertificate)Override the default certificate authority X509 certificatestatic StringcertificateAuthorityPrivateKey()static voidcertificateAuthorityPrivateKey(String certificateAuthorityPrivateKey)Override the default certificate authority private keystatic voidclearSslSubjectAlternativeNameDomains()static voidclearSslSubjectAlternativeNameIps()static booleancontainsSslSubjectAlternativeName(String domainOrIp)static booleancorsAllowCredentials()static voidcorsAllowCredentials(boolean allow)static StringcorsAllowHeaders()static voidcorsAllowHeaders(String corsAllowHeaders)static StringcorsAllowMethods()static voidcorsAllowMethods(String corsAllowMethods)static intcorsMaxAgeInSeconds()static voidcorsMaxAgeInSeconds(int ageInSeconds)static booleandeleteGeneratedKeyStoreOnExit()static voiddeleteGeneratedKeyStoreOnExit(boolean deleteGeneratedKeyStoreOnExit)static StringdirectoryToSaveDynamicSSLCertificate()static voiddirectoryToSaveDynamicSSLCertificate(String directoryToSaveDynamicSSLCertificate)Override the default location used to save dynamically generated certificates, by default this is saved as a temporary file by the JVM, for example: /var/folders/lz/_kbrwxrx4ss3brnc0y9ms2vc0000gn/T/MockServerCertificate75d431bb-cbf1-4cfe-b8a2-000ece2150e3.pem1048371440427200504.tmpstatic booleandisableSystemOut()static voiddisableSystemOut(boolean disable)static booleanenableCORSForAllResponses()static voidenableCORSForAllResponses(boolean enable)static booleanenableCORSForAPI()static voidenableCORSForAPI(boolean enable)static booleanenableCORSForAPIHasBeenSetExplicitly()static InetSocketAddressforwardHttpProxy()static voidforwardHttpProxy(String hostAndPort)static InetSocketAddressforwardHttpsProxy()static voidforwardHttpsProxy(String hostAndPort)static StringforwardProxyAuthenticationPassword()static voidforwardProxyAuthenticationPassword(String forwardProxyAuthenticationPassword)static StringforwardProxyAuthenticationUsername()static voidforwardProxyAuthenticationUsername(String forwardProxyAuthenticationUsername)static InetSocketAddressforwardSocksProxy()static voidforwardSocksProxy(String hostAndPort)static InetSocketAddresshttpProxy()Deprecated.use forwardHttpProxy insteadstatic voidhttpProxy(String hostAndPort)Deprecated.use forwardHttpProxy insteadstatic InetSocketAddresshttpsProxy()Deprecated.use forwardHttpsProxy insteadstatic voidhttpsProxy(String hostAndPort)Deprecated.use forwardHttpsProxy insteadstatic StringinitializationClass()static voidinitializationClass(String initializationClass)static StringinitializationJsonPath()static voidinitializationJsonPath(String initializationJsonPath)static StringjavaKeyStoreFilePath()static voidjavaKeyStoreFilePath(String keyStoreFilePath)static StringjavaKeyStorePassword()static voidjavaKeyStorePassword(String keyStorePassword)static StringjavaKeyStoreType()static voidjavaKeyStoreType(String keyStoreType)static StringjavaLoggerLogLevel()static StringlocalBoundIP()static voidlocalBoundIP(String localBoundIP)static org.slf4j.event.LevellogLevel()static voidlogLevel(String level)Override the default logging level of INFOstatic intmaxChunkSize()static voidmaxChunkSize(int size)static intmaxExpectations()static voidmaxExpectations(int count)static intmaxHeaderSize()static voidmaxHeaderSize(int size)static intmaxInitialLineLength()static voidmaxInitialLineLength(int length)static intmaxLogEntries()static voidmaxLogEntries(int count)static longmaxSocketTimeout()static voidmaxSocketTimeout(long milliseconds)static intmaxWebSocketExpectations()static voidmaxWebSocketExpectations(int count)static booleanmetricsEnabled()static voidmetricsEnabled(boolean enable)static intnioEventLoopThreadCount()static voidnioEventLoopThreadCount(int count)static StringpersistedExpectationsPath()static voidpersistedExpectationsPath(String persistedExpectationsPath)static booleanpersistExpectations()static voidpersistExpectations(boolean enable)static booleanpreventCertificateDynamicUpdate()static voidpreventCertificateDynamicUpdate(boolean prevent)Prevent certificates from dynamically updating when domain list changesstatic StringproxyAuthenticationPassword()static voidproxyAuthenticationPassword(String proxyAuthenticationPassword)static StringproxyAuthenticationRealm()static voidproxyAuthenticationRealm(String proxyAuthenticationRealm)static StringproxyAuthenticationUsername()static voidproxyAuthenticationUsername(String proxyAuthenticationUsername)static booleanrebuildKeyStore()static voidrebuildKeyStore(boolean rebuildKeyStore)static booleanrebuildServerKeyStore()static voidrebuildServerKeyStore(boolean rebuildKeyStore)static intringBufferSize()static intsocketConnectionTimeout()static voidsocketConnectionTimeout(int milliseconds)static InetSocketAddresssocksProxy()Deprecated.use forwardSocksProxy insteadstatic voidsocksProxy(String hostAndPort)Deprecated.use forwardSocksProxy insteadstatic StringsslCertificateDomainName()static voidsslCertificateDomainName(String domainName)static String[]sslSubjectAlternativeNameDomains()static String[]sslSubjectAlternativeNameIps()
-
-
-
Method Detail
-
maxExpectations
public static int maxExpectations()
-
maxExpectations
public static void maxExpectations(int count)
-
maxLogEntries
public static int maxLogEntries()
-
maxLogEntries
public static void maxLogEntries(int count)
-
ringBufferSize
public static int ringBufferSize()
-
maxWebSocketExpectations
public static int maxWebSocketExpectations()
-
maxWebSocketExpectations
public static void maxWebSocketExpectations(int count)
-
maxInitialLineLength
public static int maxInitialLineLength()
-
maxInitialLineLength
public static void maxInitialLineLength(int length)
-
maxHeaderSize
public static int maxHeaderSize()
-
maxHeaderSize
public static void maxHeaderSize(int size)
-
maxChunkSize
public static int maxChunkSize()
-
maxChunkSize
public static void maxChunkSize(int size)
-
nioEventLoopThreadCount
public static int nioEventLoopThreadCount()
-
nioEventLoopThreadCount
public static void nioEventLoopThreadCount(int count)
-
maxSocketTimeout
public static long maxSocketTimeout()
-
maxSocketTimeout
public static void maxSocketTimeout(long milliseconds)
-
socketConnectionTimeout
public static int socketConnectionTimeout()
-
socketConnectionTimeout
public static void socketConnectionTimeout(int milliseconds)
-
javaKeyStoreFilePath
public static String javaKeyStoreFilePath()
-
javaKeyStoreFilePath
public static void javaKeyStoreFilePath(String keyStoreFilePath)
-
javaKeyStorePassword
public static String javaKeyStorePassword()
-
javaKeyStorePassword
public static void javaKeyStorePassword(String keyStorePassword)
-
javaKeyStoreType
public static String javaKeyStoreType()
-
javaKeyStoreType
public static void javaKeyStoreType(String keyStoreType)
-
deleteGeneratedKeyStoreOnExit
public static boolean deleteGeneratedKeyStoreOnExit()
-
deleteGeneratedKeyStoreOnExit
public static void deleteGeneratedKeyStoreOnExit(boolean deleteGeneratedKeyStoreOnExit)
-
sslCertificateDomainName
public static String sslCertificateDomainName()
-
sslCertificateDomainName
public static void sslCertificateDomainName(String domainName)
-
sslSubjectAlternativeNameDomains
public static String[] sslSubjectAlternativeNameDomains()
-
addSslSubjectAlternativeNameDomains
public static void addSslSubjectAlternativeNameDomains(String... additionalSubjectAlternativeNameDomains)
-
clearSslSubjectAlternativeNameDomains
public static void clearSslSubjectAlternativeNameDomains()
-
containsSslSubjectAlternativeName
public static boolean containsSslSubjectAlternativeName(String domainOrIp)
-
sslSubjectAlternativeNameIps
public static String[] sslSubjectAlternativeNameIps()
-
addSslSubjectAlternativeNameIps
public static void addSslSubjectAlternativeNameIps(String... additionalSubjectAlternativeNameIps)
-
clearSslSubjectAlternativeNameIps
public static void clearSslSubjectAlternativeNameIps()
-
rebuildKeyStore
public static boolean rebuildKeyStore()
-
rebuildKeyStore
public static void rebuildKeyStore(boolean rebuildKeyStore)
-
rebuildServerKeyStore
public static boolean rebuildServerKeyStore()
-
rebuildServerKeyStore
public static void rebuildServerKeyStore(boolean rebuildKeyStore)
-
preventCertificateDynamicUpdate
public static void preventCertificateDynamicUpdate(boolean prevent)
Prevent certificates from dynamically updating when domain list changes- Parameters:
prevent- prevent certificates from dynamically updating when domain list changes
-
preventCertificateDynamicUpdate
public static boolean preventCertificateDynamicUpdate()
-
certificateAuthorityPrivateKey
public static String certificateAuthorityPrivateKey()
-
certificateAuthorityPrivateKey
public static void certificateAuthorityPrivateKey(String certificateAuthorityPrivateKey)
Override the default certificate authority private key- Parameters:
certificateAuthorityPrivateKey- location of the PEM file containing the certificate authority private key
-
certificateAuthorityCertificate
public static String certificateAuthorityCertificate()
-
certificateAuthorityCertificate
public static void certificateAuthorityCertificate(String certificateAuthorityCertificate)
Override the default certificate authority X509 certificate- Parameters:
certificateAuthorityCertificate- location of the PEM file containing the certificate authority X509 certificate
-
directoryToSaveDynamicSSLCertificate
public static String directoryToSaveDynamicSSLCertificate()
-
directoryToSaveDynamicSSLCertificate
public static void directoryToSaveDynamicSSLCertificate(String directoryToSaveDynamicSSLCertificate)
Override the default location used to save dynamically generated certificates, by default this is saved as a temporary file by the JVM, for example: /var/folders/lz/_kbrwxrx4ss3brnc0y9ms2vc0000gn/T/MockServerCertificate75d431bb-cbf1-4cfe-b8a2-000ece2150e3.pem1048371440427200504.tmp- Parameters:
directoryToSaveDynamicSSLCertificate- location to save private key and X509 certificate
-
logLevel
public static org.slf4j.event.Level logLevel()
-
javaLoggerLogLevel
public static String javaLoggerLogLevel()
-
logLevel
public static void logLevel(String level)
Override the default logging level of INFO- Parameters:
level- the log level, which can be TRACE, DEBUG, INFO, WARN, ERROR, OFF, FINEST, FINE, INFO, WARNING, SEVERE
-
disableSystemOut
public static boolean disableSystemOut()
-
disableSystemOut
public static void disableSystemOut(boolean disable)
-
metricsEnabled
public static boolean metricsEnabled()
-
metricsEnabled
public static void metricsEnabled(boolean enable)
-
localBoundIP
public static String localBoundIP()
-
localBoundIP
public static void localBoundIP(String localBoundIP)
-
httpProxy
@Deprecated public static InetSocketAddress httpProxy()
Deprecated.use forwardHttpProxy instead
-
httpProxy
@Deprecated public static void httpProxy(String hostAndPort)
Deprecated.use forwardHttpProxy instead
-
httpsProxy
@Deprecated public static InetSocketAddress httpsProxy()
Deprecated.use forwardHttpsProxy instead
-
httpsProxy
@Deprecated public static void httpsProxy(String hostAndPort)
Deprecated.use forwardHttpsProxy instead
-
socksProxy
@Deprecated public static InetSocketAddress socksProxy()
Deprecated.use forwardSocksProxy instead
-
socksProxy
@Deprecated public static void socksProxy(String hostAndPort)
Deprecated.use forwardSocksProxy instead
-
forwardHttpProxy
public static InetSocketAddress forwardHttpProxy()
-
forwardHttpProxy
public static void forwardHttpProxy(String hostAndPort)
-
forwardHttpsProxy
public static InetSocketAddress forwardHttpsProxy()
-
forwardHttpsProxy
public static void forwardHttpsProxy(String hostAndPort)
-
forwardSocksProxy
public static InetSocketAddress forwardSocksProxy()
-
forwardSocksProxy
public static void forwardSocksProxy(String hostAndPort)
-
forwardProxyAuthenticationUsername
public static String forwardProxyAuthenticationUsername()
-
forwardProxyAuthenticationUsername
public static void forwardProxyAuthenticationUsername(String forwardProxyAuthenticationUsername)
-
forwardProxyAuthenticationPassword
public static String forwardProxyAuthenticationPassword()
-
forwardProxyAuthenticationPassword
public static void forwardProxyAuthenticationPassword(String forwardProxyAuthenticationPassword)
-
proxyAuthenticationRealm
public static String proxyAuthenticationRealm()
-
proxyAuthenticationRealm
public static void proxyAuthenticationRealm(String proxyAuthenticationRealm)
-
proxyAuthenticationUsername
public static String proxyAuthenticationUsername()
-
proxyAuthenticationUsername
public static void proxyAuthenticationUsername(String proxyAuthenticationUsername)
-
proxyAuthenticationPassword
public static String proxyAuthenticationPassword()
-
proxyAuthenticationPassword
public static void proxyAuthenticationPassword(String proxyAuthenticationPassword)
-
initializationClass
public static String initializationClass()
-
initializationClass
public static void initializationClass(String initializationClass)
-
initializationJsonPath
public static String initializationJsonPath()
-
initializationJsonPath
public static void initializationJsonPath(String initializationJsonPath)
-
persistExpectations
public static boolean persistExpectations()
-
persistExpectations
public static void persistExpectations(boolean enable)
-
persistedExpectationsPath
public static String persistedExpectationsPath()
-
persistedExpectationsPath
public static void persistedExpectationsPath(String persistedExpectationsPath)
-
enableCORSForAPI
public static boolean enableCORSForAPI()
-
enableCORSForAPIHasBeenSetExplicitly
public static boolean enableCORSForAPIHasBeenSetExplicitly()
-
enableCORSForAPI
public static void enableCORSForAPI(boolean enable)
-
enableCORSForAllResponses
public static boolean enableCORSForAllResponses()
-
enableCORSForAllResponses
public static void enableCORSForAllResponses(boolean enable)
-
corsAllowHeaders
public static String corsAllowHeaders()
-
corsAllowHeaders
public static void corsAllowHeaders(String corsAllowHeaders)
-
corsAllowMethods
public static String corsAllowMethods()
-
corsAllowMethods
public static void corsAllowMethods(String corsAllowMethods)
-
corsAllowCredentials
public static boolean corsAllowCredentials()
-
corsAllowCredentials
public static void corsAllowCredentials(boolean allow)
-
corsMaxAgeInSeconds
public static int corsMaxAgeInSeconds()
-
corsMaxAgeInSeconds
public static void corsMaxAgeInSeconds(int ageInSeconds)
-
-