Class TimeoutListener

java.lang.Object
com.realobjects.pdfreactor.events.TimeoutListener
All Implemented Interfaces:
ProgressEventListener, EventListener

public class TimeoutListener extends Object implements ProgressEventListener

An implementation of a ProgressEventListener that automatically terminates the conversion after the specified timeout in seconds.

It is not guaranteed that the conversion will terminate exactly when the timeout is reached. Depending on the document it might take a longer until the termination is triggered.

The example below shows how to automatically terminate conversions after 15 seconds:

 Configuration config = new Configuration();
 
 config.getProgressEventListeners().add(new TimeoutListener(15));
 

  • Constructor Details

    • TimeoutListener

      public TimeoutListener(int timeout)
      Parameters:
      timeout - The conversion timeout in seconds. Must be greater than 0.