Class LocalMeasurementDataSourceWrapper
- java.lang.Object
-
- org.opennms.netmgt.jasper.measurement.local.LocalMeasurementDataSourceWrapper
-
- All Implemented Interfaces:
MeasurementDataSourceWrapper
public class LocalMeasurementDataSourceWrapper extends Object implements MeasurementDataSourceWrapper
This data source is used when the reports are running within a OpenNMS JVM. In detail they should be used if there is an implementation ofMeasurementFetchStrategy
available byBeanUtils.instantiate(Class)
.
-
-
Constructor Summary
Constructors Constructor Description LocalMeasurementDataSourceWrapper(MeasurementFetchStrategy fetchStrategy, ExpressionEngine expressionEngine, FilterEngine filterEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
net.sf.jasperreports.engine.JRRewindableDataSource
createDataSource(String query)
Creates aJRRewindableDataSource
according to the provided query.
-
-
-
Constructor Detail
-
LocalMeasurementDataSourceWrapper
public LocalMeasurementDataSourceWrapper(MeasurementFetchStrategy fetchStrategy, ExpressionEngine expressionEngine, FilterEngine filterEngine)
-
-
Method Detail
-
createDataSource
public net.sf.jasperreports.engine.JRRewindableDataSource createDataSource(String query) throws net.sf.jasperreports.engine.JRException
Description copied from interface:MeasurementDataSourceWrapper
Creates aJRRewindableDataSource
according to the provided query.- Specified by:
createDataSource
in interfaceMeasurementDataSourceWrapper
- Parameters:
query
- The query to execute. Should be a OpenNMS Measurement API parsableQueryRequest
. It may be null, but not empty.- Returns:
- The DataSource.
- Throws:
net.sf.jasperreports.engine.JRException
- In any error situation. RuntimeException are not catched and may be thrown in addition.
-
close
public void close()
- Specified by:
close
in interfaceMeasurementDataSourceWrapper
-
-