public class ClientAndServer
extends org.mockserver.client.MockServerClient
| Constructor and Description |
|---|
ClientAndServer(Configuration configuration,
Integer... ports) |
ClientAndServer(Configuration configuration,
String remoteHost,
Integer remotePort,
Integer... ports) |
ClientAndServer(Integer... ports) |
ClientAndServer(String remoteHost,
Integer remotePort,
Integer... ports) |
| Modifier and Type | Method and Description |
|---|---|
Integer |
getLocalPort() |
List<Integer> |
getLocalPorts() |
Integer |
getPort() |
InetSocketAddress |
getRemoteAddress() |
boolean |
hasStarted() |
boolean |
isRunning() |
ClientAndServer |
openUI()
Launch UI and wait the default period to allow the UI to launch and start collecting logs,
this ensures that the log are visible in the UI even if MockServer is shutdown by a test
shutdown function, such as After, AfterClass, AfterAll, etc
|
ClientAndServer |
openUI(TimeUnit timeUnit,
long pause)
Launch UI and wait a specified period to allow the UI to launch and start collecting logs,
this ensures that the log are visible in the UI even if MockServer is shutdown by a test
shutdown function, such as After, AfterClass, AfterAll, etc
|
ClientAndServer |
registerListener(ExpectationsListener expectationsListener) |
static ClientAndServer |
startClientAndServer(Configuration configuration,
Integer... port) |
static ClientAndServer |
startClientAndServer(Configuration configuration,
List<Integer> ports) |
static ClientAndServer |
startClientAndServer(Configuration configuration,
String remoteHost,
Integer remotePort,
Integer... port) |
static ClientAndServer |
startClientAndServer(Integer... port) |
static ClientAndServer |
startClientAndServer(List<Integer> ports) |
static ClientAndServer |
startClientAndServer(String remoteHost,
Integer remotePort,
Integer... port) |
void |
stop() |
CompletableFuture |
stopAsync() |
bind, clear, clear, clear, clear, clear, clear, close, contextPath, hasStarted, hasStopped, hasStopped, isRunning, isSecure, remoteAddress, reset, retrieveActiveExpectations, retrieveActiveExpectations, retrieveLogMessages, retrieveLogMessagesArray, retrieveRecordedExpectations, retrieveRecordedExpectations, retrieveRecordedRequests, retrieveRecordedRequests, retrieveRecordedRequestsAndResponses, retrieveRecordedRequestsAndResponses, sendExpectation, setProxyConfiguration, setRequestOverride, stop, upsert, upsert, verify, verify, verify, verify, verify, verify, verify, verify, verify, verify, verifyZeroInteractions, when, when, when, when, withControlPlaneJWT, withControlPlaneJWT, withProxyConfiguration, withRequestOverride, withSecurepublic ClientAndServer(Integer... ports)
public ClientAndServer(Configuration configuration, Integer... ports)
public ClientAndServer(Configuration configuration, String remoteHost, Integer remotePort, Integer... ports)
public static ClientAndServer startClientAndServer(List<Integer> ports)
public static ClientAndServer startClientAndServer(Configuration configuration, List<Integer> ports)
public static ClientAndServer startClientAndServer(Integer... port)
public static ClientAndServer startClientAndServer(Configuration configuration, Integer... port)
public static ClientAndServer startClientAndServer(String remoteHost, Integer remotePort, Integer... port)
public static ClientAndServer startClientAndServer(Configuration configuration, String remoteHost, Integer remotePort, Integer... port)
public ClientAndServer openUI()
openUI in class org.mockserver.client.MockServerClientpublic ClientAndServer openUI(TimeUnit timeUnit, long pause)
openUI in class org.mockserver.client.MockServerClienttimeUnit - TimeUnit the time unit, for example TimeUnit.SECONDSpause - the number of time units to delay before the function returns to ensure the UI is receiving logspublic boolean isRunning()
isRunning in class org.mockserver.client.MockServerClientpublic boolean hasStarted()
hasStarted in class org.mockserver.client.MockServerClientpublic CompletableFuture stopAsync()
stopAsync in class org.mockserver.client.MockServerClientpublic void stop()
public Integer getPort()
getPort in class org.mockserver.client.MockServerClientpublic Integer getLocalPort()
public InetSocketAddress getRemoteAddress()
public ClientAndServer registerListener(ExpectationsListener expectationsListener)
Copyright © 2023. All rights reserved.