-
- 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<IRequest>matchedRequestsprivate final RequestMatchingrequestMatcherprivate final BasePactpactprivate final MockProviderConfigconfig
-
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. final ConcurrentHashMap<IRequest, List<PactVerificationResult>>getMismatchedRequests()final ConcurrentLinkedQueue<IRequest>getMatchedRequests()final RequestMatchinggetRequestMatcher()final BasePactgetPact()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(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.
-
getPort
Integer getPort()
Returns the port of the mock server. This will be the port the server is bound to.
-
getMismatchedRequests
final ConcurrentHashMap<IRequest, List<PactVerificationResult>> getMismatchedRequests()
-
getMatchedRequests
final ConcurrentLinkedQueue<IRequest> getMatchedRequests()
-
getRequestMatcher
final RequestMatching getRequestMatcher()
-
getPact
final BasePact getPact()
-
getConfig
final MockProviderConfig getConfig()
-
-
-
-