Class HttpAdminClient
java.lang.Object
com.github.tomakehurst.wiremock.client.HttpAdminClient
- All Implemented Interfaces:
Admin
-
Constructor Summary
ConstructorDescriptionHttpAdminClient
(String host, int port) HttpAdminClient
(String host, int port, String urlPathPrefix) HttpAdminClient
(String scheme, String host, int port) HttpAdminClient
(String scheme, String host, int port, String urlPathPrefix) HttpAdminClient
(String scheme, String host, int port, String urlPathPrefix, String hostHeader) HttpAdminClient
(String scheme, String host, int port, String urlPathPrefix, String hostHeader, String proxyHost, int proxyPort) HttpAdminClient
(String scheme, String host, int port, String urlPathPrefix, String hostHeader, String proxyHost, int proxyPort, ClientAuthenticator authenticator) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStubMapping
(StubMapping stubMapping) countRequestsMatching
(RequestPattern requestPattern) void
editStubMapping
(StubMapping stubMapping) findAllStubsByMetadata
(StringValuePattern pattern) findRequestsMatching
(RequestPattern requestPattern) findTopNearMissesFor
(RequestPattern requestPattern) findTopNearMissesFor
(LoggedRequest loggedRequest) protected String
getServedStub
(UUID id) getServeEvents
(ServeEventQuery query) getStubMapping
(UUID id) void
importStubs
(StubImport stubImport) int
port()
void
removeServeEvent
(UUID eventId) removeServeEventsForStubsMatchingMetadata
(StringValuePattern metadataPattern) removeServeEventsMatching
(RequestPattern requestPattern) void
removeStubMapping
(StubMapping stubbMapping) void
void
removeStubsByMetadata
(StringValuePattern pattern) void
resetAll()
void
void
void
resetScenario
(String name) void
void
void
void
setScenarioState
(String name, String state) void
snapshotRecord
(RecordSpec spec) void
startRecording
(RecordSpec recordSpec) void
startRecording
(RecordSpecBuilder recordSpec) void
startRecording
(String targetBaseUrl) void
updateGlobalSettings
(GlobalSettings settings)
-
Constructor Details
-
HttpAdminClient
-
HttpAdminClient
-
HttpAdminClient
-
HttpAdminClient
-
HttpAdminClient
-
HttpAdminClient
-
HttpAdminClient
-
-
Method Details
-
addStubMapping
- Specified by:
addStubMapping
in interfaceAdmin
-
editStubMapping
- Specified by:
editStubMapping
in interfaceAdmin
-
removeStubMapping
- Specified by:
removeStubMapping
in interfaceAdmin
-
removeStubMapping
- Specified by:
removeStubMapping
in interfaceAdmin
-
listAllStubMappings
- Specified by:
listAllStubMappings
in interfaceAdmin
-
getStubMapping
- Specified by:
getStubMapping
in interfaceAdmin
-
saveMappings
public void saveMappings()- Specified by:
saveMappings
in interfaceAdmin
-
resetAll
public void resetAll() -
resetRequests
public void resetRequests()- Specified by:
resetRequests
in interfaceAdmin
-
resetScenarios
public void resetScenarios()- Specified by:
resetScenarios
in interfaceAdmin
-
resetMappings
public void resetMappings()- Specified by:
resetMappings
in interfaceAdmin
-
resetToDefaultMappings
public void resetToDefaultMappings()- Specified by:
resetToDefaultMappings
in interfaceAdmin
-
getServeEvents
- Specified by:
getServeEvents
in interfaceAdmin
-
getServeEvents
- Specified by:
getServeEvents
in interfaceAdmin
-
getServedStub
- Specified by:
getServedStub
in interfaceAdmin
-
countRequestsMatching
- Specified by:
countRequestsMatching
in interfaceAdmin
-
findRequestsMatching
- Specified by:
findRequestsMatching
in interfaceAdmin
-
findUnmatchedRequests
- Specified by:
findUnmatchedRequests
in interfaceAdmin
-
removeServeEvent
- Specified by:
removeServeEvent
in interfaceAdmin
-
removeServeEventsMatching
- Specified by:
removeServeEventsMatching
in interfaceAdmin
-
removeServeEventsForStubsMatchingMetadata
public FindServeEventsResult removeServeEventsForStubsMatchingMetadata(StringValuePattern metadataPattern) - Specified by:
removeServeEventsForStubsMatchingMetadata
in interfaceAdmin
-
findNearMissesForUnmatchedRequests
- Specified by:
findNearMissesForUnmatchedRequests
in interfaceAdmin
-
getAllScenarios
- Specified by:
getAllScenarios
in interfaceAdmin
-
resetScenario
- Specified by:
resetScenario
in interfaceAdmin
-
setScenarioState
- Specified by:
setScenarioState
in interfaceAdmin
-
findTopNearMissesFor
- Specified by:
findTopNearMissesFor
in interfaceAdmin
-
findTopNearMissesFor
- Specified by:
findTopNearMissesFor
in interfaceAdmin
-
updateGlobalSettings
- Specified by:
updateGlobalSettings
in interfaceAdmin
-
snapshotRecord
- Specified by:
snapshotRecord
in interfaceAdmin
-
snapshotRecord
- Specified by:
snapshotRecord
in interfaceAdmin
-
snapshotRecord
- Specified by:
snapshotRecord
in interfaceAdmin
-
startRecording
- Specified by:
startRecording
in interfaceAdmin
-
startRecording
- Specified by:
startRecording
in interfaceAdmin
-
startRecording
- Specified by:
startRecording
in interfaceAdmin
-
stopRecording
- Specified by:
stopRecording
in interfaceAdmin
-
getRecordingStatus
- Specified by:
getRecordingStatus
in interfaceAdmin
-
getOptions
- Specified by:
getOptions
in interfaceAdmin
-
shutdownServer
public void shutdownServer()- Specified by:
shutdownServer
in interfaceAdmin
-
findAllStubsByMetadata
- Specified by:
findAllStubsByMetadata
in interfaceAdmin
-
removeStubsByMetadata
- Specified by:
removeStubsByMetadata
in interfaceAdmin
-
importStubs
- Specified by:
importStubs
in interfaceAdmin
-
getGlobalSettings
- Specified by:
getGlobalSettings
in interfaceAdmin
-
port
public int port() -
getJsonAssertOkAndReturnBody
-