public abstract class AbstractReportProcessor extends Object implements ReportProcessor
Modifier and Type | Field and Description |
---|---|
protected static int |
COMMIT_RATE |
protected static int |
MAX_EVENTS_PER_RUN |
protected static int |
MIN_ROWS_PER_EVENT |
Modifier | Constructor and Description |
---|---|
protected |
AbstractReportProcessor(MasterReport report,
OutputProcessor outputProcessor) |
Modifier and Type | Method and Description |
---|---|
void |
addReportProgressListener(ReportProgressListener l)
Adds a repagination listener.
|
protected int |
calculatePageCount(ProcessState state) |
void |
cancel() |
protected void |
checkInterrupted()
Checks whether the current thread is interrupted.
|
void |
close() |
protected abstract OutputFunction |
createLayoutManager() |
protected DefaultProcessingContext |
createProcessingContext() |
protected void |
fireProcessingFinished(ReportProgressEvent state)
Sends a repagination update to all registered listeners.
|
protected void |
fireProcessingStarted(ReportProgressEvent state)
Sends a repagination update to all registered listeners.
|
protected void |
fireStateUpdate(ReportProgressEvent state)
Sends a repagination update to all registered listeners.
|
Configuration |
getConfiguration() |
int |
getLogicalPageCount() |
protected PageState |
getLogicalPageState(int page) |
OutputProcessor |
getOutputProcessor() |
protected OutputProcessorMetaData |
getOutputProcessorMetaData() |
int |
getPhysicalPageCount() |
protected PageState |
getPhysicalPageState(int page) |
protected ProcessStateHandle |
getProcessStateHandle() |
protected MasterReport |
getReport() |
boolean |
isFullStreamingProcessor() |
boolean |
isHandleInterruptedState()
Returns whether the processor should check the threads interrupted state.
|
boolean |
isPaginated() |
boolean |
isQueryLimitReached() |
protected static boolean |
isStrictErrorHandling(Configuration config)
Checks whether report processing should be aborted when an exception occurs.
|
boolean |
paginate() |
protected void |
prepareReportProcessing() |
PageState |
processPage(PageState pageState,
boolean performOutput) |
protected ProcessState |
processPrepareLevels(ProcessState state,
int maxRows)
Processes all prepare levels to compute the function values.
|
void |
processReport() |
void |
removeReportProgressListener(ReportProgressListener l)
Removes a repagination listener.
|
void |
setFullStreamingProcessor(boolean fullStreamingProcessor) |
void |
setHandleInterruptedState(boolean handleInterruptedState)
Defines, whether the processor should check the threads interrupted state.
|
void |
setQueryLimitReached(boolean queryLimitReached) |
protected static final int MAX_EVENTS_PER_RUN
protected static final int MIN_ROWS_PER_EVENT
protected static final int COMMIT_RATE
protected AbstractReportProcessor(MasterReport report, OutputProcessor outputProcessor) throws ReportProcessingException
ReportProcessingException
protected ProcessStateHandle getProcessStateHandle()
protected MasterReport getReport()
public OutputProcessor getOutputProcessor()
protected OutputProcessorMetaData getOutputProcessorMetaData()
public void addReportProgressListener(ReportProgressListener l)
addReportProgressListener
in interface ReportProcessor
l
- the listener.public void removeReportProgressListener(ReportProgressListener l)
removeReportProgressListener
in interface ReportProcessor
l
- the listener.protected void fireStateUpdate(ReportProgressEvent state)
state
- the state.protected void fireProcessingStarted(ReportProgressEvent state)
state
- the state.protected void fireProcessingFinished(ReportProgressEvent state)
state
- the state.public boolean isHandleInterruptedState()
isHandleInterruptedState
in interface ReportProcessor
public void setHandleInterruptedState(boolean handleInterruptedState)
setHandleInterruptedState
in interface ReportProcessor
handleInterruptedState
- true, if the processor should check the current thread state, false otherwise.protected final void checkInterrupted() throws ReportInterruptedException
ReportInterruptedException
- if the thread is interrupted to abort the report processing.public void close()
close
in interface ReportProcessor
public void cancel()
public Configuration getConfiguration()
getConfiguration
in interface ReportProcessor
protected DefaultProcessingContext createProcessingContext() throws ReportProcessingException
ReportProcessingException
protected ProcessState processPrepareLevels(ProcessState state, int maxRows) throws ReportProcessingException
state
- the state state with which we beginn the processing.maxRows
- the number of rows in the table model.ReportProcessingException
- if processing failed or if there are exceptions during the function execution.protected abstract OutputFunction createLayoutManager()
protected void prepareReportProcessing() throws ReportProcessingException
ReportProcessingException
public void setFullStreamingProcessor(boolean fullStreamingProcessor)
public boolean isFullStreamingProcessor()
protected int calculatePageCount(ProcessState state)
public boolean isPaginated()
protected PageState getLogicalPageState(int page)
protected PageState getPhysicalPageState(int page)
protected static boolean isStrictErrorHandling(Configuration config)
config
- the configuration.public PageState processPage(PageState pageState, boolean performOutput) throws ReportProcessingException
processPage
in interface ReportProcessor
ReportProcessingException
public boolean paginate() throws ReportProcessingException
ReportProcessingException
public void processReport() throws ReportProcessingException
processReport
in interface ReportProcessor
ReportProcessingException
public int getLogicalPageCount()
public int getPhysicalPageCount()
public boolean isQueryLimitReached()
public void setQueryLimitReached(boolean queryLimitReached)
Copyright © 2017 Hitachi Vantara. All rights reserved.