use of org.apache.camel.component.atmos.integration.consumer.AtmosScheduledPollConsumer in project camel by apache.
the class AtmosEndpoint method createConsumer.
/**
* Create one of the camel consumer available based on the configuration
*
* @param processor the given processor
* @return the camel consumer
* @throws Exception
*/
public Consumer createConsumer(Processor processor) throws Exception {
LOG.debug("resolve consumer atmos endpoint {" + configuration.getOperation().toString() + "}");
LOG.debug("resolve consumer atmos attached client:" + configuration.getClient());
AtmosScheduledPollConsumer consumer;
if (this.configuration.getOperation() == AtmosOperation.get) {
consumer = new AtmosScheduledPollGetConsumer(this, processor, configuration);
consumer.setDelay(POLL_CONSUMER_DELAY);
return consumer;
} else {
throw new AtmosException("operation specified is not valid for consumer!");
}
}
Aggregations