Search in sources :

Example 1 with AtmosGetProducer

use of org.apache.camel.component.atmos.integration.producer.AtmosGetProducer in project camel by apache.

the class AtmosEndpoint method createProducer.

/**
     * Create one of the camel producer available based on the configuration
     *
     * @return the camel producer
     * @throws Exception
     */
public Producer createProducer() throws Exception {
    LOG.debug("resolve producer atmos endpoint {" + configuration.getOperation().toString() + "}");
    LOG.debug("resolve producer atmos attached client: " + configuration.getClient());
    if (configuration.getOperation() == AtmosOperation.put) {
        return new AtmosPutProducer(this, configuration);
    } else if (this.configuration.getOperation() == AtmosOperation.del) {
        return new AtmosDelProducer(this, configuration);
    } else if (this.configuration.getOperation() == AtmosOperation.get) {
        return new AtmosGetProducer(this, configuration);
    } else if (this.configuration.getOperation() == AtmosOperation.move) {
        return new AtmosMoveProducer(this, configuration);
    } else {
        throw new AtmosException("operation specified is not valid for producer!");
    }
}
Also used : AtmosDelProducer(org.apache.camel.component.atmos.integration.producer.AtmosDelProducer) AtmosPutProducer(org.apache.camel.component.atmos.integration.producer.AtmosPutProducer) AtmosMoveProducer(org.apache.camel.component.atmos.integration.producer.AtmosMoveProducer) AtmosException(org.apache.camel.component.atmos.util.AtmosException) AtmosGetProducer(org.apache.camel.component.atmos.integration.producer.AtmosGetProducer)

Aggregations

AtmosDelProducer (org.apache.camel.component.atmos.integration.producer.AtmosDelProducer)1 AtmosGetProducer (org.apache.camel.component.atmos.integration.producer.AtmosGetProducer)1 AtmosMoveProducer (org.apache.camel.component.atmos.integration.producer.AtmosMoveProducer)1 AtmosPutProducer (org.apache.camel.component.atmos.integration.producer.AtmosPutProducer)1 AtmosException (org.apache.camel.component.atmos.util.AtmosException)1