-
- 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<Request, List<PactVerificationResult>>mismatchedRequestsprivate final ConcurrentLinkedQueue<Request>matchedRequestsprivate final RequestMatchingrequestMatcherprivate final RequestResponsePactpactprivate final MockProviderConfigconfig
-
Constructor Summary
Constructors Constructor Description BaseJdkMockServer(RequestResponsePact pact, MockProviderConfig config, HttpServer server, Boolean stopped)
-
Method Summary
Modifier and Type Method Description Unithandle(HttpExchange exchange)Unitstart()Unitstop()StringgetUrl()Returns the URL for this mock server. IntegergetPort()Returns the port of the mock server. final ConcurrentHashMap<Request, List<PactVerificationResult>>getMismatchedRequests()final ConcurrentLinkedQueue<Request>getMatchedRequests()final RequestMatchinggetRequestMatcher()final RequestResponsePactgetPact()final MockProviderConfiggetConfig()-
Methods inherited from class com.sun.net.httpserver.HttpHandler
equals, hashCode, toString -
Methods inherited from class au.com.dius.pact.consumer.BaseJdkMockServer
invalidResponse, runAndWritePact, validateMockServerState, verifyResultAndWritePact, waitForServer -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BaseJdkMockServer
BaseJdkMockServer(RequestResponsePact pact, MockProviderConfig config, HttpServer server, Boolean stopped)
-
-
Method Detail
-
getUrl
String getUrl()
Returns the URL for this mock server. The port will be the one bound by the server.
-
getPort
Integer getPort()
Returns the port of the mock server. This will be the port the server is bound to.
-
getMismatchedRequests
final ConcurrentHashMap<Request, List<PactVerificationResult>> getMismatchedRequests()
-
getMatchedRequests
final ConcurrentLinkedQueue<Request> getMatchedRequests()
-
getRequestMatcher
final RequestMatching getRequestMatcher()
-
getPact
final RequestResponsePact getPact()
-
getConfig
final MockProviderConfig getConfig()
-
-
-
-