public class AsyncJasperPrintAccessor extends Object implements JasperPrintAccessor, AsynchronousFilllListener, FillListener
| Modifier and Type | Field and Description |
|---|---|
static String |
EXCEPTION_MESSAGE_KEY_ASYNC_REPORT_GENERATION_ERROR |
static String |
EXCEPTION_MESSAGE_KEY_LOCK_ATTEMPT_INTERRUPTED |
static String |
EXCEPTION_MESSAGE_KEY_NO_JASPERPRINT_GENERATED |
static String |
EXCEPTION_MESSAGE_KEY_REPORT_GENERATION_CANCELLED |
| Constructor and Description |
|---|
AsyncJasperPrintAccessor(FillHandle fillHandle)
Create a report accessor.
|
| Modifier and Type | Method and Description |
|---|---|
JasperPrint |
getFinalJasperPrint()
Returns the generated report, ensuring before that the report generation has ended.
|
JasperPrint |
getJasperPrint()
Returns the generated report.
|
ReportExecutionStatus |
getReportStatus()
Returns the status of the report execution.
|
protected void |
lock() |
void |
pageGenerated(JasperPrint jasperPrint,
int pageIndex)
Called when a report page has been generated.
|
ReportPageStatus |
pageStatus(int pageIdx,
Long pageTimestamp)
Ensures that a page is available in the generated report.
|
void |
pageUpdated(JasperPrint jasperPrint,
int pageIndex)
Called when a previously generated page has been updated,
usually by evaluating a delayed element.
|
void |
reportCancelled()
Called when the report is cancelled.
|
void |
reportFillError(Throwable t)
Called when the filling process exits in error.
|
void |
reportFinished(JasperPrint jasperPrint)
Called when the report filling is done.
|
protected void |
unlock() |
boolean |
waitForFinalJasperPrint(int milliseconds) |
public static final String EXCEPTION_MESSAGE_KEY_LOCK_ATTEMPT_INTERRUPTED
public static final String EXCEPTION_MESSAGE_KEY_NO_JASPERPRINT_GENERATED
public static final String EXCEPTION_MESSAGE_KEY_REPORT_GENERATION_CANCELLED
public static final String EXCEPTION_MESSAGE_KEY_ASYNC_REPORT_GENERATION_ERROR
public AsyncJasperPrintAccessor(FillHandle fillHandle)
fillHandle - the asynchronous fill handle used by this accessorprotected void lock()
protected void unlock()
public ReportPageStatus pageStatus(int pageIdx, Long pageTimestamp)
JasperPrintAccessorpageStatus in interface JasperPrintAccessorpageIdx - the page indexpublic JasperPrint getJasperPrint()
JasperPrintAccessorgetJasperPrint in interface JasperPrintAccessorpublic boolean waitForFinalJasperPrint(int milliseconds)
public JasperPrint getFinalJasperPrint()
JasperPrintAccessorgetFinalJasperPrint in interface JasperPrintAccessorpublic void reportFinished(JasperPrint jasperPrint)
AsynchronousFilllListenerreportFinished in interface AsynchronousFilllListenerjasperPrint - the filled reportpublic void reportCancelled()
AsynchronousFilllListenerreportCancelled in interface AsynchronousFilllListenerpublic void reportFillError(Throwable t)
AsynchronousFilllListenerreportFillError in interface AsynchronousFilllListenert - the exceptionpublic void pageGenerated(JasperPrint jasperPrint, int pageIndex)
FillListenerpageGenerated in interface FillListenerjasperPrint - the report that is currently generatingpageIndex - the index of the page that has been generatedpublic void pageUpdated(JasperPrint jasperPrint, int pageIndex)
FillListenerpageUpdated in interface FillListenerjasperPrint - the report that is currently generatingpageIndex - the index of the page that has been updatedpublic ReportExecutionStatus getReportStatus()
JasperPrintAccessorgetReportStatus in interface JasperPrintAccessorCopyright © 2017. All rights reserved.