net.sf.jasperreports.web.servlets
Class ReportExecutionStatus

java.lang.Object
  extended by net.sf.jasperreports.web.servlets.ReportExecutionStatus

public class ReportExecutionStatus
extends java.lang.Object

Information related to the status of a report execution.

Version:
$Id: ReportExecutionStatus.java 5293 2012-04-24 15:48:15Z lucianc $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)

Nested Class Summary
static class ReportExecutionStatus.Status
          Report execution statuses.
 
Constructor Summary
protected ReportExecutionStatus(ReportExecutionStatus.Status status, java.lang.Integer totalPageCount, int currentPageCount, java.lang.Throwable error)
           
 
Method Summary
static ReportExecutionStatus canceled(int pageCount)
          Creates a canceled status
static ReportExecutionStatus error(int pageCount, java.lang.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.
 java.lang.Throwable getError()
          Returns the error encountered during the report generation, if any.
 ReportExecutionStatus.Status getStatus()
          Returns the status of the execution.
 java.lang.Integer getTotalPageCount()
          Returns the total number of pages in the report, or null if not yet known.
static ReportExecutionStatus running(int pageCount)
          Create a running status.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReportExecutionStatus

protected ReportExecutionStatus(ReportExecutionStatus.Status status,
                                java.lang.Integer totalPageCount,
                                int currentPageCount,
                                java.lang.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,
                                          java.lang.Throwable error)
Creates an error status.

Parameters:
pageCount - the current number of pages
error - 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 java.lang.Integer getTotalPageCount()
Returns the total number of pages in the report, or null 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 java.lang.Throwable getError()
Returns the error encountered during the report generation, if any.

Returns:
the error encountered during the report generation, if any


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com