Interface FileCompleteCallback

All Known Implementing Classes:
HttpFileImpl

public interface FileCompleteCallback
Invokes on completion of writing the FileChannel content.
Author:
Daniel Sagenschneider
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    complete(FileChannel file, boolean isWritten)
    Invoked on completion of writing the FileChannel content.
  • Method Details

    • complete

      void complete(FileChannel file, boolean isWritten) throws IOException

      Invoked on completion of writing the FileChannel content.

      Note that may also be invoked if content was not written (rather cancelled).

      Typical use is to close the FileChannel once complete.

      WARNING: this is typically invoked on the SocketChannel Thread so should not invoke any long running operations.

      Parameters:
      file - FileChannel from the write.
      isWritten - true indicates whether written, while false indicates cancelled.
      Throws:
      IOException - If issue in interacting with FileChannel.