Package org.mockserver.persistence
Class ExpectationFileSystemPersistence
java.lang.Object
org.mockserver.persistence.ExpectationFileSystemPersistence
- All Implemented Interfaces:
MockServerMatcherListener
-
Constructor Summary
ConstructorsConstructorDescriptionExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, RequestMatchers requestMatchers) Backwards-compatible constructor that creates aFilesystemBlobStoreinternally, preserving the original direct-file-I/O behaviour for callers that do not supply a BlobStore (e.g. existing tests).ExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, RequestMatchers requestMatchers, BlobStore blobStore) Creates persistence backed by the givenBlobStore. -
Method Summary
Modifier and TypeMethodDescriptionserialize(List<Expectation> expectations) serialize(Expectation... expectations) voidstop()voidupdated(RequestMatchers requestMatchers, MockServerMatcherNotifier.Cause cause)
-
Constructor Details
-
ExpectationFileSystemPersistence
public ExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, RequestMatchers requestMatchers, BlobStore blobStore) Creates persistence backed by the givenBlobStore. The blob key is the absolute path ofconfiguration.persistedExpectationsPath()so that theFilesystemBlobStorewrites to the exact same file as the previous direct-I/O implementation.- Parameters:
configuration- the MockServer configurationmockServerLogger- logger for diagnosticsrequestMatchers- the request matchers to observe for changesblobStore- the blob store to delegate writes to
-
ExpectationFileSystemPersistence
public ExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, RequestMatchers requestMatchers) Backwards-compatible constructor that creates aFilesystemBlobStoreinternally, preserving the original direct-file-I/O behaviour for callers that do not supply a BlobStore (e.g. existing tests).
-
-
Method Details
-
updated
- Specified by:
updatedin interfaceMockServerMatcherListener
-
serialize
-
serialize
-
stop
public void stop()
-