Class RemoteMeasurementDataSourceWrapper
- java.lang.Object
-
- org.opennms.netmgt.jasper.measurement.remote.RemoteMeasurementDataSourceWrapper
-
- All Implemented Interfaces:
MeasurementDataSourceWrapper
public class RemoteMeasurementDataSourceWrapper extends java.lang.Object implements MeasurementDataSourceWrapper
Makes Measurement API requests and wraps the request in an appropriateJRRewindableDataSource
.
-
-
Constructor Summary
Constructors Constructor Description RemoteMeasurementDataSourceWrapper(boolean useSsl, java.lang.String url, java.lang.String username, java.lang.String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
net.sf.jasperreports.engine.JRRewindableDataSource
createDataSource(java.lang.String query)
Creates aJRRewindableDataSource
according to the provided query.
-
-
-
Method Detail
-
createDataSource
public net.sf.jasperreports.engine.JRRewindableDataSource createDataSource(java.lang.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
-
-