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;
}
}