001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.camel; 018 019/** 020 * Global endpoint configurations which can be set as defaults when Camel creates new {@link Endpoint}s. 021 */ 022public interface GlobalEndpointConfiguration { 023 024 boolean isLazyStartProducer(); 025 026 /** 027 * Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup 028 * in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then 029 * the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed 030 * then creating and starting the producer may take a little time and prolong the total processing time of the processing. 031 */ 032 void setLazyStartProducer(boolean lazyStartProducer); 033 034 boolean isBridgeErrorHandler(); 035 036 /** 037 * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while 038 * the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and 039 * handled by the routing Error Handler. 040 * <p/> 041 * By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, 042 * that will be logged at WARN/ERROR level and ignored. 043 */ 044 void setBridgeErrorHandler(boolean bridgeErrorHandler); 045 046 boolean isBasicPropertyBinding(); 047 048 /** 049 * Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities. 050 */ 051 void setBasicPropertyBinding(boolean basicPropertyBinding); 052 053}