Package net.sf.jasperreports.engine.fill
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 (lucianc@users.sourceforge.net)
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddFillListener(FillListener listener) Adds a fill listener to the filling process.voidaddListener(AsynchronousFilllListener listener) Adds a listener to the filling process.voidCancels the fill started by the handle.booleanisPageFinal(int pageIdx) Determines wheter a page generated by the fill process is final or not.booleanremoveListener(AsynchronousFilllListener listener) Removes a listener from the filling process.voidStarts the filling process asychronously.
-
Method Details
-
addListener
Adds a listener to the filling process.- Parameters:
listener- the listener to be added
-
removeListener
Removes a listener from the filling process.- Parameters:
listener- the listener to be removed- Returns:
- true if the listener was found and removed
-
addFillListener
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
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:
-