Adapter Development Kit 9.12 | webMethods Adapter Development Kit Documentation | webMethods Adapter Development Kit Installation and User’s Documentation | Listener Notifications | Listener Implementation | Creating getReader Method in WmManagedConnection Implementation Class
 
Creating getReader Method in WmManagedConnection Implementation Class
Create the getReader method in the WmManagedConnection implementation class. This method is called from the listenerStartup method in WmConnectedListener implementation class.
package com.wm.MyAdapter.connections;
..
..
import java.io.FileReader;
import java.io.FileNotFoundException;
..
..
public class SimpleConnection extends WmManagedConnection {
..
..
public FileReader getReader(String fileName) throws AdapterException
{
FileReader _reader = null;

try {
_reader = new FileReader(fileName);
}
catch(Exception e) {
throw MyAdapter.getInstance().createAdapterException(100,e);
}
return _reader;
}
}