public class JRThreadSubreportRunner extends JRSubreportRunnable implements JRSubreportRunner
JRSubreportRunner
implementation.
The subreport fill is launched in a new thread which coordinates suspend/resume actions with the master thread.
Constructor and Description |
---|
JRThreadSubreportRunner(JRFillSubreport fillSubreport,
JRBaseFiller subreportFiller) |
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the current fill process.
|
boolean |
isFilling()
Decides whether the subreport filling has ended or not.
|
void |
reset()
Resets the runner, preparing it for a new fill.
|
JRSubreportRunResult |
resume()
Resumes the filling of a subreport.
|
void |
run() |
JRSubreportRunResult |
start()
Starts to fill the subreport.
|
void |
suspend()
Suspends the current fill.
|
protected JRSubreportRunResult |
waitResult() |
isRunning, runResult
public JRThreadSubreportRunner(JRFillSubreport fillSubreport, JRBaseFiller subreportFiller)
public boolean isFilling()
JRSubreportRunner
isFilling
in interface JRSubreportRunner
true
if and only if the subreport filling has not endedpublic JRSubreportRunResult start()
JRSubreportRunner
This method is always called by a thread owning the lock on the subreport filler.
start
in interface JRSubreportRunner
public JRSubreportRunResult resume()
JRSubreportRunner
This method is called after the fill has been suspended by
suspend
and the subreport should continue on the new page.
This method is always called by a thread owning the lock on the subreport filler.
resume
in interface JRSubreportRunner
protected JRSubreportRunResult waitResult()
public void reset()
JRSubreportRunner
reset
in interface JRSubreportRunner
public void cancel() throws JRException
JRSubreportRunner
This method is called when a subreport is placed on a non splitting band and needs to rewind.
This method is always called by a thread owning the lock on the subreport filler.
cancel
in interface JRSubreportRunner
JRException
public void suspend() throws JRException
JRSubreportRunner
This method is called when the subreport reaches the end of a page and needs to wait for the master to create a new page.
This method is always called by a thread owning the lock on the subreport filler.
suspend
in interface JRSubreportRunner
JRException
public void run()
run
in interface java.lang.Runnable
run
in class JRSubreportRunnable
© 2001-2010 Jaspersoft Corporation www.jaspersoft.com