Class NoOpFileSink

java.lang.Object
com.agentforge4j.runtime.command.NoOpFileSink
All Implemented Interfaces:
FileSink

public final class NoOpFileSink extends Object implements FileSink
Canonical FileSink that accepts writes but performs no I/O.

This is the default sink the runtime falls back to when no FileSink is configured: CreateFileCommand output is silently discarded. The runtime never assumes a filesystem, so this keeps the engine storage-agnostic until an embedding application supplies a real sink (for example LocalFileSink, a database, or object storage).

Assembly layers that fall back to this sink are responsible for warning the operator that file output is discarded (see bootstrap's ComponentDefaults); this class itself is intentionally silent to avoid duplicate warnings on every write.

The shared FileSink.NO_OP_FILE_SINK constant exposes a singleton instance of this class.

  • Constructor Details

    • NoOpFileSink

      public NoOpFileSink()
  • Method Details

    • write

      public void write(String runId, String stepId, String path, String content)
      Accepts the write and performs no I/O.
      Specified by:
      write in interface FileSink
      Parameters:
      runId - id of the owning run; ignored
      stepId - id of the producing step; ignored
      path - the path the agent requested; ignored
      content - the file content; discarded