Package net.officefloor.server.stream
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 TypeMethodDescriptionvoidcomplete(FileChannel file, boolean isWritten) Invoked on completion of writing theFileChannelcontent.
-
Method Details
-
complete
Invoked on completion of writing the
FileChannelcontent.Note that may also be invoked if content was not written (rather cancelled).
Typical use is to close the
FileChannelonce complete.WARNING: this is typically invoked on the
SocketChannelThreadso should not invoke any long running operations.- Parameters:
file-FileChannelfrom the write.isWritten-trueindicates whether written, whilefalseindicates cancelled.- Throws:
IOException- If issue in interacting withFileChannel.
-