Package com.documents4j.api
Interface IFileConsumer
-
public interface IFileConsumerConsumes a file after a terminated conversion.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCancel(File file)Invoked if the conversion was cancelled.voidonComplete(File file)Invoked if the conversion was completed successfully.voidonException(File file, Exception e)Invoked if the conversion finished with an exception.
-
-
-
Method Detail
-
onComplete
void onComplete(File file)
Invoked if the conversion was completed successfully. If this callback throws an exception, the conversion will be marked as unsuccessful and the exception is rethrown on any invocation of the resulting future'sFuture.get()method.- Parameters:
file- The file to which the conversion result was written.
-
onCancel
void onCancel(File file)
Invoked if the conversion was cancelled. If this callback throws an exception, the exception will be suppressed.- Parameters:
file- The file to which the conversion result was supposed to be written.
-
onException
void onException(File file, Exception e)
Invoked if the conversion finished with an exception. If this callback throws an exception, the exception will be suppressed.- Parameters:
file- The file to which the conversion result was supposed to be written.e- An exception representing the reason for the failed conversion.
-
-