Search in sources :

Example 1 with AtmosScheduledPollConsumer

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!");
    }
}
Also used : AtmosScheduledPollGetConsumer(org.apache.camel.component.atmos.integration.consumer.AtmosScheduledPollGetConsumer) AtmosScheduledPollConsumer(org.apache.camel.component.atmos.integration.consumer.AtmosScheduledPollConsumer) AtmosException(org.apache.camel.component.atmos.util.AtmosException)

Aggregations

AtmosScheduledPollConsumer (org.apache.camel.component.atmos.integration.consumer.AtmosScheduledPollConsumer)1 AtmosScheduledPollGetConsumer (org.apache.camel.component.atmos.integration.consumer.AtmosScheduledPollGetConsumer)1 AtmosException (org.apache.camel.component.atmos.util.AtmosException)1