Class MockServer
java.lang.Object
de.gematik.test.tiger.mockserver.lifecycle.LifeCycle
de.gematik.test.tiger.mockserver.netty.MockServer
-
Field Summary
Fields inherited from class de.gematik.test.tiger.mockserver.lifecycle.LifeCycle
bossGroup, httpState, serverServerBootstrap, workerGroup -
Constructor Summary
ConstructorsConstructorDescriptionMockServer(MockServerConfiguration 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 proxyMockServer(MockServerConfiguration configuration, Integer... localPorts) Start the instance using the ports providedMockServer(MockServerConfiguration configuration, Integer remotePort, String remoteHost, Integer... localPorts) Start the instance using the ports providedMockServer(MockServerConfiguration configuration, List<ProxyConfiguration> proxyConfigurations, Integer... localPorts) Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxyMockServer(MockServerConfiguration 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 proxyMockServer(ProxyConfiguration proxyConfiguration, Integer... localPorts) Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxyMockServer(Integer... localPorts) Start the instance using the ports providedMockServer(Integer remotePort, String remoteHost, Integer... localPorts) Start the instance using the ports provided -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectionWithStatus(SocketAddress socketAddress, TigerConnectionStatus status) voidremoveExpectation(String expectationId) voidremoveRemoteAddress(SocketAddress socketAddress) when(HttpRequest httpRequest, Integer priority, List<String> hostRegexes) when(HttpRequest requestDefinition, List<String> hostRegexes) Methods inherited from class de.gematik.test.tiger.mockserver.lifecycle.LifeCycle
bindServerPorts, close, getBossGroup, getConfiguration, getEventLoopGroup, getHttpState, getLocalPort, getLocalPorts, getPort, getScheduler, getServerChannelFutures, getServerServerBootstrap, getStopFuture, getStopping, getWorkerGroup, isRunning, startedServer, stop, stopAsync
-
Constructor Details
-
MockServer
Start the instance using the ports provided- Parameters:
localPorts- the local port(s) to use, use 0 or no vararg values to specify any free port
-
MockServer
Start the instance using the ports provided- Parameters:
localPorts- the local port(s) to use, use 0 or no vararg values to specify any free port
-
MockServer
Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy- Parameters:
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 port
-
MockServer
public MockServer(MockServerConfiguration configuration, List<ProxyConfiguration> proxyConfigurations, Integer... localPorts) Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy- Parameters:
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 port
-
MockServer
Start the instance using the ports provided- Parameters:
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 use
-
MockServer
public MockServer(MockServerConfiguration configuration, Integer remotePort, @Nullable String remoteHost, Integer... localPorts) Start the instance using the ports provided- Parameters:
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 use
-
MockServer
public MockServer(MockServerConfiguration configuration, ProxyConfiguration proxyConfiguration, @Nullable String remoteHost, Integer remotePort, Integer... localPorts) Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy- Parameters:
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 to
-
MockServer
public MockServer(MockServerConfiguration configuration, List<ProxyConfiguration> proxyConfigurations, @Nullable String remoteHost, Integer remotePort, Integer... localPorts) Start the instance using the ports provided configuring forwarded or proxied requests to go via an additional proxy- Parameters:
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 to
-
-
Method Details
-
getRemoteAddress
-
when
-
when
-
removeExpectation
-
retrieveActiveExpectations
-
addConnectionWithStatus
-
getOpenConnections
-
removeRemoteAddress
-
getRemoteSocket
-
getActionHandler
-
getConnectionStatusMap
-