public class MockServer extends LifeCycle
bossGroup, httpState, mockServerLogger, serverServerBootstrap, workerGroup| Constructor and Description | 
|---|
MockServer(Configuration configuration,
          Integer... localPorts)
Start the instance using the ports provided 
 | 
MockServer(Configuration configuration,
          Integer remotePort,
          String remoteHost,
          Integer... localPorts)
Start the instance using the ports provided 
 | 
MockServer(Configuration configuration,
          List<ProxyConfiguration> proxyConfigurations,
          Integer... localPorts)
Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy 
 | 
MockServer(Configuration configuration,
          List<ProxyConfiguration> proxyConfigurations,
          String remoteHost,
          Integer remotePort,
          Integer... localPorts)
Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy 
 | 
MockServer(Configuration configuration,
          ProxyConfiguration proxyConfiguration,
          String remoteHost,
          Integer remotePort,
          Integer... localPorts)
Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy 
 | 
MockServer(Integer... localPorts)
Start the instance using the ports provided 
 | 
MockServer(Integer remotePort,
          String remoteHost,
          Integer... localPorts)
Start the instance using the ports provided 
 | 
MockServer(ProxyConfiguration proxyConfiguration,
          Integer... localPorts)
Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy 
 | 
| Modifier and Type | Method and Description | 
|---|---|
InetSocketAddress | 
getRemoteAddress()  | 
MockServer | 
registerListener(ExpectationsListener expectationsListener)  | 
bindServerPorts, close, getEventLoopGroup, getLocalPort, getLocalPorts, getPort, getScheduler, isRunning, startedServer, stop, stopAsyncpublic MockServer(Integer... localPorts)
localPorts - the local port(s) to use, use 0 or no vararg values to specify any free portpublic MockServer(Configuration configuration, Integer... localPorts)
localPorts - the local port(s) to use, use 0 or no vararg values to specify any free portpublic MockServer(ProxyConfiguration proxyConfiguration, Integer... localPorts)
proxyConfiguration - the proxy configuration to send requests forwarded or proxied by MockServer via another proxylocalPorts - the local port(s) to use, use 0 or no vararg values to specify any free portpublic MockServer(Configuration configuration, List<ProxyConfiguration> proxyConfigurations, Integer... localPorts)
proxyConfigurations - the proxy configuration to send requests forwarded or proxied by MockServer via another proxylocalPorts - the local port(s) to use, use 0 or no vararg values to specify any free portpublic MockServer(Integer remotePort, @Nullable String remoteHost, Integer... localPorts)
remotePort - the port of the remote server to connect toremoteHost - the hostname of the remote server to connect to (if null defaults to "localhost")localPorts - the local port(s) to usepublic MockServer(Configuration configuration, Integer remotePort, @Nullable String remoteHost, Integer... localPorts)
remotePort - the port of the remote server to connect toremoteHost - the hostname of the remote server to connect to (if null defaults to "localhost")localPorts - the local port(s) to usepublic MockServer(Configuration configuration, ProxyConfiguration proxyConfiguration, @Nullable String remoteHost, Integer remotePort, Integer... localPorts)
localPorts - the local port(s) to useremoteHost - the hostname of the remote server to connect to (if null defaults to "localhost")remotePort - the port of the remote server to connect topublic MockServer(Configuration configuration, List<ProxyConfiguration> proxyConfigurations, @Nullable String remoteHost, Integer remotePort, Integer... localPorts)
localPorts - the local port(s) to useremoteHost - the hostname of the remote server to connect to (if null defaults to "localhost")remotePort - the port of the remote server to connect topublic InetSocketAddress getRemoteAddress()
public MockServer registerListener(ExpectationsListener expectationsListener)
registerListener in class LifeCycleCopyright © 2022. All rights reserved.