public class AsynchronousFillHandle extends BaseFillHandle
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.
Modifier and Type | Class and Description |
---|---|
protected class |
AsynchronousFillHandle.ThreadExecutor |
BaseFillHandle.ReportFill
Modifier and Type | Field and Description |
---|---|
protected Thread |
fillThread |
protected Integer |
priority |
static String |
PROPERTY_REPORT_ASYNC
A property that determines whether a report can be generated and displayed asynchronously in a viewer.
|
protected String |
threadName |
cancelled, conn, dataSource, filler, jasperReport, jasperReportsContext, listeners, lock, parameters, running, started
Modifier | Constructor and Description |
---|---|
protected |
AsynchronousFillHandle(JasperReportsContext jasperReportsContext,
JasperReport jasperReport,
Map<String,Object> parameters) |
protected |
AsynchronousFillHandle(JasperReportsContext jasperReportsContext,
JasperReport jasperReport,
Map<String,Object> parameters,
Connection conn) |
protected |
AsynchronousFillHandle(JasperReportsContext jasperReportsContext,
JasperReport jasperReport,
Map<String,Object> parameters,
JRDataSource dataSource) |
protected |
AsynchronousFillHandle(JasperReportsContext jasperReportsContext,
JasperReport jasperReport,
Map<String,Object> parameters,
JRDataSource dataSource,
Connection conn) |
Modifier and Type | Method and Description |
---|---|
static AsynchronousFillHandle |
createHandle(JasperReport jasperReport,
Map<String,Object> parameters) |
static AsynchronousFillHandle |
createHandle(JasperReport jasperReport,
Map<String,Object> parameters,
Connection conn) |
static AsynchronousFillHandle |
createHandle(JasperReport jasperReport,
Map<String,Object> parameters,
JRDataSource dataSource) |
static AsynchronousFillHandle |
createHandle(JasperReportsContext jasperReportsContext,
JasperReport jasperReport,
Map<String,Object> parameters)
Creates an asychronous filling handle.
|
static AsynchronousFillHandle |
createHandle(JasperReportsContext jasperReportsContext,
JasperReport jasperReport,
Map<String,Object> parameters,
Connection conn)
Creates an asychronous filling handle.
|
static AsynchronousFillHandle |
createHandle(JasperReportsContext jasperReportsContext,
JasperReport jasperReport,
Map<String,Object> parameters,
JRDataSource dataSource)
Creates an asychronous filling handle.
|
protected Executor |
getReportExecutor()
Returns an executor that creates a new thread to perform the report execution.
|
void |
setPriority(int priority)
Sets the priority of the filler thread.
|
void |
setThreadName(String name)
Sets the name of the filler thread.
|
addFillListener, addListener, cancellFill, isPageFinal, notifyCancel, notifyError, notifyFinish, removeListener, startFill
public static final String PROPERTY_REPORT_ASYNC
protected Thread fillThread
protected Integer priority
protected String threadName
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String,Object> parameters, JRDataSource dataSource) throws JRException
JRException
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String,Object> parameters, Connection conn) throws JRException
JRException
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String,Object> parameters) throws JRException
JRException
protected AsynchronousFillHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String,Object> parameters, JRDataSource dataSource, Connection conn) throws JRException
JRException
protected Executor getReportExecutor()
getReportExecutor
in class BaseFillHandle
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String,Object> parameters, JRDataSource dataSource) throws JRException
jasperReportsContext
- the contextjasperReport
- the reportparameters
- the parameter mapdataSource
- the data sourceJRException
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String,Object> parameters, Connection conn) throws JRException
jasperReportsContext
- the contextjasperReport
- the reportparameters
- the parameter mapconn
- the connectionJRException
public static AsynchronousFillHandle createHandle(JasperReportsContext jasperReportsContext, JasperReport jasperReport, Map<String,Object> parameters) throws JRException
jasperReportsContext
- the contextjasperReport
- the reportparameters
- the parameter mapJRException
public static AsynchronousFillHandle createHandle(JasperReport jasperReport, Map<String,Object> parameters, JRDataSource dataSource) throws JRException
public static AsynchronousFillHandle createHandle(JasperReport jasperReport, Map<String,Object> parameters, Connection conn) throws JRException
JRException
createHandle(JasperReportsContext, JasperReport, Map, Connection)
public static AsynchronousFillHandle createHandle(JasperReport jasperReport, Map<String,Object> parameters) throws JRException
JRException
createHandle(JasperReportsContext, JasperReport, Map)
public void setPriority(int priority)
priority
- the filler thread priority.Thread.setPriority(int)
public void setThreadName(String name)
name
- the filler thread name.Thread.setName(java.lang.String)
Copyright © 2016. All rights reserved.