Package net.sf.jasperreports.engine.fill
Class AsynchronousFillHandle
java.lang.Object
net.sf.jasperreports.engine.fill.BaseFillHandle
net.sf.jasperreports.engine.fill.AsynchronousFillHandle
- All Implemented Interfaces:
FillHandle
Class 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)
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.sf.jasperreports.engine.fill.BaseFillHandle
BaseFillHandle.ReportFill -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Threadprotected Integerstatic final StringA property that determines whether a report can be generated and displayed asynchronously in a viewer.protected StringFields inherited from class net.sf.jasperreports.engine.fill.BaseFillHandle
cancelled, conn, dataSource, filler, jasperReport, jasperReportsContext, listeners, lock, parameters, running, started -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters, JRDataSource dataSource, Connection conn) protectedAsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters) protectedAsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, Connection conn) protectedAsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource) protectedAsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource, Connection conn) -
Method Summary
Modifier and TypeMethodDescriptionstatic AsynchronousFillHandlecreateHandle(JasperReport jasperReport, Map<String, Object> parameters) static AsynchronousFillHandlecreateHandle(JasperReport jasperReport, Map<String, Object> parameters, Connection conn) static AsynchronousFillHandlecreateHandle(JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource) static AsynchronousFillHandlecreateHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters) static AsynchronousFillHandlecreateHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters, Connection conn) static AsynchronousFillHandlecreateHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters, JRDataSource dataSource) static AsynchronousFillHandlecreateHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters) Creates an asychronous filling handle.static AsynchronousFillHandlecreateHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, Connection conn) Creates an asychronous filling handle.static AsynchronousFillHandlecreateHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource) Creates an asychronous filling handle.protected ExecutorReturns an executor that creates a new thread to perform the report execution.voidsetPriority(int priority) Sets the priority of the filler thread.voidsetThreadName(String name) Sets the name of the filler thread.Methods inherited from class net.sf.jasperreports.engine.fill.BaseFillHandle
addFillListener, addListener, cancellFill, isPageFinal, notifyCancel, notifyError, notifyFinish, removeListener, startFill
-
Field Details
-
PROPERTY_REPORT_ASYNC
A property that determines whether a report can be generated and displayed asynchronously in a viewer. Asynchronous report generation implies displaying report pages before the report is complete.- See Also:
-
fillThread
-
priority
-
threadName
-
-
Constructor Details
-
AsynchronousFillHandle
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource) throws JRException- Throws:
JRException
-
AsynchronousFillHandle
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, Connection conn) throws JRException- Throws:
JRException
-
AsynchronousFillHandle
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters) throws JRException- Throws:
JRException
-
AsynchronousFillHandle
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource, Connection conn) throws JRException- Throws:
JRException
-
AsynchronousFillHandle
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters, JRDataSource dataSource, Connection conn) throws JRException- Throws:
JRException
-
-
Method Details
-
getReportExecutor
Returns an executor that creates a new thread to perform the report execution.- Specified by:
getReportExecutorin classBaseFillHandle
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource) throws JRExceptionCreates an asychronous filling handle.- Parameters:
jasperReportsContext- the contextjasperReport- the reportparameters- the parameter mapdataSource- the data source- Returns:
- the handle
- Throws:
JRException
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters, JRDataSource dataSource) throws JRException- Throws:
JRException
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters, Connection conn) throws JRExceptionCreates an asychronous filling handle.- Parameters:
jasperReportsContext- the contextjasperReport- the reportparameters- the parameter mapconn- the connection- Returns:
- the handle
- Throws:
JRException
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters, Connection conn) throws JRException- Throws:
JRException
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String, Object> parameters) throws JRExceptionCreates an asychronous filling handle.- Parameters:
jasperReportsContext- the contextjasperReport- the reportparameters- the parameter map- Returns:
- the handle
- Throws:
JRException
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReportSource reportSource, Map<String, Object> parameters) throws JRException- Throws:
JRException
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReport jasperReport, Map<String, Object> parameters, JRDataSource dataSource) throws JRException- Throws:
JRException- See Also:
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReport jasperReport, Map<String, Object> parameters, Connection conn) throws JRException- Throws:
JRException- See Also:
-
createHandle
public static AsynchronousFillHandle createHandle(JasperReport jasperReport, Map<String, Object> parameters) throws JRException- Throws:
JRException- See Also:
-
setPriority
public void setPriority(int priority) Sets the priority of the filler thread.- Parameters:
priority- the filler thread priority.- See Also:
-
setThreadName
Sets the name of the filler thread.- Parameters:
name- the filler thread name.- See Also:
-