Processor processor = null;
DataSink dataSink = null;
try {
processor = Manager.createProcessor(dataSource);
processor.addControllerListener(controllerListener);
processor.configure();
// Put the Processor into configured state so we can set
// some processing options on the processor.
if (!waitForState(processor, Processor.Configured)) {
throw new IOException("Failed to configure the processor.");
}