Class RecordedExpectationFileSystemPersistence

java.lang.Object
org.mockserver.persistence.RecordedExpectationFileSystemPersistence
All Implemented Interfaces:
MockServerLogListener

public class RecordedExpectationFileSystemPersistence extends Object implements MockServerLogListener
  • Constructor Details

    • RecordedExpectationFileSystemPersistence

      public RecordedExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, MockServerEventLog mockServerEventLog, BlobStore blobStore)
      Creates persistence backed by the given BlobStore. The blob key is derived by BlobKeys.forPersistedFile(BlobStore, Path): the absolute path of configuration.persistedRecordedExpectationsPath() for the FilesystemBlobStore, so it writes the exact same file as the previous direct-I/O implementation, and the FILE NAME alone for every other store, because an absolute local path is not a valid object-store key.
      Parameters:
      configuration - the MockServer configuration
      mockServerLogger - logger for diagnostics
      mockServerEventLog - the event log to observe for recorded expectations
      blobStore - the blob store to delegate writes to
    • RecordedExpectationFileSystemPersistence

      public RecordedExpectationFileSystemPersistence(Configuration configuration, MockServerLogger mockServerLogger, MockServerEventLog mockServerEventLog)
      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