Search in sources :

Example 1 with InputTransformerConsumer

use of ddf.camel.component.catalog.inputtransformer.InputTransformerConsumer in project ddf by codice.

the class CatalogEndpoint method createConsumer.

/*
     * (non-Javadoc)
     * 
     * @see org.apache.camel.Endpoint#createConsumer(org.apache.camel.Processor)
     */
public Consumer createConsumer(Processor processor) {
    LOGGER.debug("INSIDE createConsumer");
    // Camel Consumers map to <from> route nodes.
    Consumer consumer = null;
    // e.g., <from uri="catalog:inputtransformer?mimeType=text/xml&amp;id=xml" />
    if (contextPath.equals(INPUT_TRANSFORMER)) {
        consumer = new InputTransformerConsumer(this, processor);
    } else if (contextPath.equals(QUERYRESPONSE_TRANSFORMER)) {
        consumer = new QueryResponseTransformerConsumer(this, processor);
    } else {
        LOGGER.debug("Unable to create consumer for context path [{}]", contextPath);
        throw new IllegalArgumentException("Unable to create consumer for context path [" + contextPath + "]");
    }
    return consumer;
}
Also used : QueryResponseTransformerConsumer(ddf.camel.component.catalog.queryresponsetransformer.QueryResponseTransformerConsumer) Consumer(org.apache.camel.Consumer) InputTransformerConsumer(ddf.camel.component.catalog.inputtransformer.InputTransformerConsumer) QueryResponseTransformerConsumer(ddf.camel.component.catalog.queryresponsetransformer.QueryResponseTransformerConsumer) InputTransformerConsumer(ddf.camel.component.catalog.inputtransformer.InputTransformerConsumer)

Aggregations

InputTransformerConsumer (ddf.camel.component.catalog.inputtransformer.InputTransformerConsumer)1 QueryResponseTransformerConsumer (ddf.camel.component.catalog.queryresponsetransformer.QueryResponseTransformerConsumer)1 Consumer (org.apache.camel.Consumer)1