Package net.sf.jasperreports.engine.fill
Class AbstractThreadSubreportRunner
- java.lang.Object
-
- net.sf.jasperreports.engine.fill.JRSubreportRunnable
-
- net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner
-
- All Implemented Interfaces:
Runnable
,JRSubreportRunner
- Direct Known Subclasses:
JRThreadSubreportRunner
,ThreadExecutorSubreportRunner
public abstract class AbstractThreadSubreportRunner extends JRSubreportRunnable implements JRSubreportRunner
- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXCEPTION_MESSAGE_KEY_THREAD_REPORT_RUNNER_WAIT_ERROR
static String
EXCEPTION_MESSAGE_KEY_THREAD_SUBREPORT_RUNNER_WAIT_ERROR
protected JRBaseFiller
subreportFiller
-
Constructor Summary
Constructors Constructor Description AbstractThreadSubreportRunner(JRFillSubreport fillSubreport, JRBaseFiller subreportFiller)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
abort()
Aborts the current fill.void
cancel()
Cancels the current fill process.protected abstract void
doStart()
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()
-
Methods inherited from class net.sf.jasperreports.engine.fill.JRSubreportRunnable
isRunning, runResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.jasperreports.engine.fill.JRSubreportRunner
isFilling, reset
-
-
-
-
Field Detail
-
EXCEPTION_MESSAGE_KEY_THREAD_REPORT_RUNNER_WAIT_ERROR
public static final String EXCEPTION_MESSAGE_KEY_THREAD_REPORT_RUNNER_WAIT_ERROR
- See Also:
- Constant Field Values
-
EXCEPTION_MESSAGE_KEY_THREAD_SUBREPORT_RUNNER_WAIT_ERROR
public static final String EXCEPTION_MESSAGE_KEY_THREAD_SUBREPORT_RUNNER_WAIT_ERROR
- See Also:
- Constant Field Values
-
subreportFiller
protected final JRBaseFiller subreportFiller
-
-
Constructor Detail
-
AbstractThreadSubreportRunner
public AbstractThreadSubreportRunner(JRFillSubreport fillSubreport, JRBaseFiller subreportFiller)
-
-
Method Detail
-
start
public JRSubreportRunResult start()
Description copied from interface:JRSubreportRunner
Starts to fill the subreport.This method is always called by a thread owning the lock on the subreport filler.
- Specified by:
start
in interfaceJRSubreportRunner
- Returns:
- the result of the fill process
-
doStart
protected abstract void doStart()
-
resume
public JRSubreportRunResult resume()
Description copied from interface:JRSubreportRunner
Resumes the filling of a subreport.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.
- Specified by:
resume
in interfaceJRSubreportRunner
- Returns:
- the result of the fill process
-
waitResult
protected JRSubreportRunResult waitResult()
-
cancel
public void cancel() throws JRException
Description copied from interface:JRSubreportRunner
Cancels the current fill process.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.
- Specified by:
cancel
in interfaceJRSubreportRunner
- Throws:
JRException
-
suspend
public void suspend() throws JRException
Description copied from interface:JRSubreportRunner
Suspends the current fill.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.
- Specified by:
suspend
in interfaceJRSubreportRunner
- Throws:
JRException
-
run
public void run()
- Specified by:
run
in interfaceRunnable
- Overrides:
run
in classJRSubreportRunnable
-
abort
public void abort()
Description copied from interface:JRSubreportRunner
Aborts the current fill.- Specified by:
abort
in interfaceJRSubreportRunner
-
-