public class AsyncJasperPrintAccessor extends java.lang.Object implements JasperPrintAccessor, AsynchronousFilllListener, FillListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXCEPTION_MESSAGE_KEY_ASYNC_REPORT_GENERATION_ERROR |
static java.lang.String |
EXCEPTION_MESSAGE_KEY_LOCK_ATTEMPT_INTERRUPTED |
static java.lang.String |
EXCEPTION_MESSAGE_KEY_NO_JASPERPRINT_GENERATED |
static java.lang.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,
java.lang.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(java.lang.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 java.lang.String EXCEPTION_MESSAGE_KEY_LOCK_ATTEMPT_INTERRUPTED
public static final java.lang.String EXCEPTION_MESSAGE_KEY_NO_JASPERPRINT_GENERATED
public static final java.lang.String EXCEPTION_MESSAGE_KEY_REPORT_GENERATION_CANCELLED
public static final java.lang.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, java.lang.Long pageTimestamp)
JasperPrintAccessor
pageStatus
in interface JasperPrintAccessor
pageIdx
- the page indexpublic JasperPrint getJasperPrint()
JasperPrintAccessor
getJasperPrint
in interface JasperPrintAccessor
public boolean waitForFinalJasperPrint(int milliseconds)
public JasperPrint getFinalJasperPrint()
JasperPrintAccessor
getFinalJasperPrint
in interface JasperPrintAccessor
public void reportFinished(JasperPrint jasperPrint)
AsynchronousFilllListener
reportFinished
in interface AsynchronousFilllListener
jasperPrint
- the filled reportpublic void reportCancelled()
AsynchronousFilllListener
reportCancelled
in interface AsynchronousFilllListener
public void reportFillError(java.lang.Throwable t)
AsynchronousFilllListener
reportFillError
in interface AsynchronousFilllListener
t
- the exceptionpublic void pageGenerated(JasperPrint jasperPrint, int pageIndex)
FillListener
pageGenerated
in interface FillListener
jasperPrint
- the report that is currently generatingpageIndex
- the index of the page that has been generatedpublic void pageUpdated(JasperPrint jasperPrint, int pageIndex)
FillListener
pageUpdated
in interface FillListener
jasperPrint
- the report that is currently generatingpageIndex
- the index of the page that has been updatedpublic ReportExecutionStatus getReportStatus()
JasperPrintAccessor
getReportStatus
in interface JasperPrintAccessor
© 2001-2014 TIBCO Software Inc. www.jaspersoft.com