Search in sources :

Example 1 with RestContextRefDefinition

use of org.apache.camel.model.RestContextRefDefinition in project camel by apache.

the class AbstractCamelContextFactoryBean method initRestRefs.

protected void initRestRefs() throws Exception {
    // add rest refs to existing rests
    if (getRestRefs() != null) {
        for (RestContextRefDefinition ref : getRestRefs()) {
            List<RestDefinition> defs = ref.lookupRests(getContext());
            for (RestDefinition def : defs) {
                LOG.debug("Adding rest from {} -> {}", ref, def);
                // add in top as they are most likely to be common/shared
                // which you may want to start first
                getRests().add(0, def);
            }
        }
    }
}
Also used : RestDefinition(org.apache.camel.model.rest.RestDefinition) RestContextRefDefinition(org.apache.camel.model.RestContextRefDefinition)

Aggregations

RestContextRefDefinition (org.apache.camel.model.RestContextRefDefinition)1 RestDefinition (org.apache.camel.model.rest.RestDefinition)1