Package au.com.dius.pact.consumer
Class BaseJdkMockServer
-
- All Implemented Interfaces:
-
au.com.dius.pact.consumer.MockServer,com.sun.net.httpserver.HttpHandler
public abstract class BaseJdkMockServer extends BaseMockServer implements HttpHandler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBaseJdkMockServer.Companion
-
Field Summary
Fields Modifier and Type Field Description private final ConcurrentHashMap<IRequest, List<PactVerificationResult>>mismatchedRequestsprivate final ConcurrentLinkedQueue<Pair<IRequest, IRequest>>matchedRequestsprivate final BasePactpactprivate final MockProviderConfigconfigpublic final static BaseJdkMockServer.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description BaseJdkMockServer(BasePact pact, MockProviderConfig config, HttpServer server, Boolean stopped)
-
Method Summary
Modifier and Type Method Description Unithandle(HttpExchange exchange)final RequesttoPactRequest(HttpExchange exchange)Unitstart()Unitstop()StringgetUrl()Returns the URL for this mock server. IntegergetPort()Returns the port of the mock server. -
Methods inherited from class au.com.dius.pact.consumer.BaseMockServer
getConfig, getMatchedRequests, getMismatchedRequests, getPact, runAndWritePact, validateMockServerState, verifyResultAndWritePact, waitForServer -
Methods inherited from class au.com.dius.pact.consumer.MockServer
updatePact -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BaseJdkMockServer
BaseJdkMockServer(BasePact pact, MockProviderConfig config, HttpServer server, Boolean stopped)
-
-
Method Detail
-
toPactRequest
final Request toPactRequest(HttpExchange exchange)
-
getUrl
String getUrl()
Returns the URL for this mock server. The port will be the one bound by the server.
-
-
-
-