Interface FillHandle

  • All Known Implementing Classes:
    AsynchronousFillHandle, BaseFillHandle

    public interface FillHandle
    Interface implemented by classes that are used to perform report filling asychronously.

    An instance of this type can be used as a handle to an asychronous fill process. The main benefit of this method is that the filling process can be cancelled.

    Author:
    Lucian Chirita ([email protected])
    • Method Detail

      • addListener

        void addListener​(AsynchronousFilllListener listener)
        Adds a listener to the filling process.
        Parameters:
        listener - the listener to be added
      • removeListener

        boolean removeListener​(AsynchronousFilllListener listener)
        Removes a listener from the filling process.
        Parameters:
        listener - the listener to be removed
        Returns:
        true if the listener was found and removed
      • addFillListener

        void addFillListener​(FillListener listener)
        Adds a fill listener to the filling process. The fill listener is notified of intermediate events that occur during the report generation.
        Parameters:
        listener - the listener to add
      • startFill

        void startFill()
        Starts the filling process asychronously.

        The filling can be launched on a new thread and the method exits after the execution is started.

        When the filling finishes either in success or failure, the listeners are notified.

      • cancellFill

        void cancellFill()
                  throws JRException
        Cancels the fill started by the handle.

        The method sends a cancel signal to the filling process. When the filling process will end, the listeners will be notified that the filling has been cancelled.

        Throws:
        JRException
      • isPageFinal

        boolean isPageFinal​(int pageIdx)
        Determines wheter a page generated by the fill process is final or not.
        Parameters:
        pageIdx - the page index
        Returns:
        whether the page at the specified index is final or can be subject to future changes
        See Also:
        FillListener.pageUpdated(JasperPrint, int)