org.pentaho.reporting.engine.classic.core.layout.output
Class YieldReportListener

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.layout.output.YieldReportListener
All Implemented Interfaces:
EventListener, ReportProgressListener

public class YieldReportListener
extends Object
implements ReportProgressListener

A report listener that calls Thread.yield() on each generated event. Although this slows down the report processing a bit, this also makes the application a lot more responsive as the report-thread does no longer block the CPU all the time.

Author:
Thomas Morgner

Constructor Summary
YieldReportListener()
           
YieldReportListener(int rate)
           
 
Method Summary
 int getRate()
           
 void reportProcessingFinished(ReportProgressEvent event)
          Receives a notification that the report processing was finished.
 void reportProcessingStarted(ReportProgressEvent event)
          Receives a notification that the report processing has started.
 void reportProcessingUpdate(ReportProgressEvent event)
          Receives a notification that the report processing made some progress.
 void setRate(int rate)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YieldReportListener

public YieldReportListener()

YieldReportListener

public YieldReportListener(int rate)
Method Detail

getRate

public int getRate()

setRate

public void setRate(int rate)

reportProcessingStarted

public void reportProcessingStarted(ReportProgressEvent event)
Description copied from interface: ReportProgressListener
Receives a notification that the report processing has started.

Specified by:
reportProcessingStarted in interface ReportProgressListener
Parameters:
event - the start event.

reportProcessingFinished

public void reportProcessingFinished(ReportProgressEvent event)
Description copied from interface: ReportProgressListener
Receives a notification that the report processing was finished.

Specified by:
reportProcessingFinished in interface ReportProgressListener
Parameters:
event - the finish event.

reportProcessingUpdate

public void reportProcessingUpdate(ReportProgressEvent event)
Description copied from interface: ReportProgressListener
Receives a notification that the report processing made some progress.

Specified by:
reportProcessingUpdate in interface ReportProgressListener
Parameters:
event - the update event.