Java 类net.sf.jasperreports.engine.fill.FillListener 实例源码

项目:jasperreports    文件:AsyncReport.java   
public void runReport(Map<String, Object> params, FillListener fillListener)
{
    try
    {
        Map<String, Object> reportParams = reportParams(params);
        AsynchronousFillHandle asyncHandle = AsynchronousFillHandle.createHandle(
                jasperReportsContext, report, reportParams);

        if (fillListener != null)
        {
            asyncHandle.addFillListener(fillListener);
        }

        AsyncJasperPrintAccessor accessor = new AsyncJasperPrintAccessor(asyncHandle);
        asyncHandle.startFill();
        JasperPrint print = accessor.getFinalJasperPrint();
        reportComplete(reportParams, print);
    }
    catch (JRException | NoSuchAlgorithmException | IOException e)
    {
        throw new RuntimeException(e);
    }
}