Class ExpectationFileSystemPersistence

java.lang.Object
org.mockserver.persistence.ExpectationFileSystemPersistence
All Implemented Interfaces:
MockServerMatcherListener

public class ExpectationFileSystemPersistence extends Object implements MockServerMatcherListener
  • Constructor Details

    • ExpectationFileSystemPersistence

      public ExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, RequestMatchers requestMatchers, BlobStore blobStore)
      Creates persistence backed by the given BlobStore. The blob key is the absolute path of configuration.persistedExpectationsPath() so that the FilesystemBlobStore writes to the exact same file as the previous direct-I/O implementation.
      Parameters:
      configuration - the MockServer configuration
      mockServerLogger - logger for diagnostics
      requestMatchers - the request matchers to observe for changes
      blobStore - the blob store to delegate writes to
    • ExpectationFileSystemPersistence

      public ExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, RequestMatchers requestMatchers)
      Backwards-compatible constructor that creates a FilesystemBlobStore internally, preserving the original direct-file-I/O behaviour for callers that do not supply a BlobStore (e.g. existing tests).
  • Method Details