Java event handlers for a scripted data source element
The scripted data source interface extends the IDataSourceEventHandler interface, which has four methods. The ScriptedDataSource interface adds two new methods to the four methods of the IDataSourceEventHandler interface. A Java class that provides the ScriptedDataSource event handlers must implement IScriptedDataSourceEventHandler interface or extend the ScriptedDataSourceAdapter class. A Java class that provides the ScriptedDataSource event handlers must implement the two methods of the IScriptedDataSourceEventHandler interface plus the four methods of the IDataSourceEventHandler interface, which it extends.
Both of the two event handler methods of IScriptedDataSourceEventHandler receive an IDataSourceInstance object. Table 38‑4 lists the two additional methods that you must implement for a ScriptedDataSource element.
Table 38‑4 Scripted data source event handler methods 
Method
Description
open( IDataSourceInstance dataSource )
Use this method to open the data source.
close( IDataSourceInstance dataSource )
Use this method to close the data source and perform clean‑up tasks.