* @throws Exception
*/
public Consumer createConsumer(Processor processor) throws Exception {
LOG.debug("resolve consumer dropbox endpoint {" + configuration.getOperation().toString() + "}");
LOG.debug("resolve consumer dropbox attached client:" + configuration.getClient());
DropboxScheduledPollConsumer consumer = null;
if (this.configuration.getOperation() == DropboxOperation.search) {
consumer = new DropboxScheduledPollSearchConsumer(this, processor, configuration);
consumer.setDelay(POLL_CONSUMER_DELAY);
return consumer;
} else if (this.configuration.getOperation() == DropboxOperation.get) {
consumer = new DropboxScheduledPollGetConsumer(this, processor, configuration);
consumer.setDelay(POLL_CONSUMER_DELAY);
return consumer;
} else {
throw new DropboxException("operation specified is not valid for consumer!");
}
}