Class ReportExecutionStatus
- java.lang.Object
-
- net.sf.jasperreports.web.servlets.ReportExecutionStatus
-
public class ReportExecutionStatus extends Object
Information related to the status of a report execution.- Author:
- Lucian Chirita (lucianc@users.sourceforge.net)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReportExecutionStatus.Status
Report execution statuses.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ReportExecutionStatus(ReportExecutionStatus.Status status, Integer totalPageCount, int currentPageCount, Throwable error)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReportExecutionStatus
canceled(int pageCount)
Creates a canceled statusstatic ReportExecutionStatus
error(int pageCount, Throwable error)
Creates an error status.static ReportExecutionStatus
finished(int pageCount)
Creates a finished status.int
getCurrentPageCount()
Returns the number of pages generated so far.Throwable
getError()
Returns the error encountered during the report generation, if any.ReportExecutionStatus.Status
getStatus()
Returns the status of the execution.Integer
getTotalPageCount()
Returns the total number of pages in the report, ornull
if not yet known.static ReportExecutionStatus
running(int pageCount)
Create a running status.
-
-
-
Constructor Detail
-
ReportExecutionStatus
protected ReportExecutionStatus(ReportExecutionStatus.Status status, Integer totalPageCount, int currentPageCount, Throwable error)
-
-
Method Detail
-
finished
public static ReportExecutionStatus finished(int pageCount)
Creates a finished status.- Parameters:
pageCount
- the total number of pages- Returns:
- a finished status
-
canceled
public static ReportExecutionStatus canceled(int pageCount)
Creates a canceled status- Parameters:
pageCount
- the current number of pages- Returns:
- a canceled status
-
error
public static ReportExecutionStatus error(int pageCount, Throwable error)
Creates an error status.- Parameters:
pageCount
- the current number of pageserror
- the error- Returns:
- an error status
-
running
public static ReportExecutionStatus running(int pageCount)
Create a running status.- Parameters:
pageCount
- the current number of pages- Returns:
- a running status
-
getStatus
public ReportExecutionStatus.Status getStatus()
Returns the status of the execution.- Returns:
- the status of the execution
-
getTotalPageCount
public Integer getTotalPageCount()
Returns the total number of pages in the report, ornull
if not yet known.- Returns:
- the total number of pages in the report if known
-
getCurrentPageCount
public int getCurrentPageCount()
Returns the number of pages generated so far.- Returns:
- the current number of pages
-
getError
public Throwable getError()
Returns the error encountered during the report generation, if any.- Returns:
- the error encountered during the report generation, if any
-
-