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 */ 017 package org.apache.camel; 018 019 /** 020 * Various runtime configuration used by {@link org.apache.camel.CamelContext} and {@link org.apache.camel.spi.RouteContext} 021 * for cross cutting functions such as tracing, delayer, stream cache and the likes. 022 * 023 * @version $Revision: 798862 $ 024 */ 025 public interface RuntimeConfiguration { 026 027 /** 028 * Sets whether stream caching is enabled or not (default is disabled). 029 * <p/> 030 * Is disabled by default 031 * 032 * @param cache whether stream caching is enabled or not 033 */ 034 void setStreamCaching(Boolean cache); 035 036 /** 037 * Returns whether stream cache is enabled 038 * 039 * @return true if stream cache is enabled 040 */ 041 boolean isStreamCaching(); 042 043 /** 044 * Sets whether tracing is enabled or not (default is disabled). 045 * <p/> 046 * Is disabled by default 047 * 048 * @param tracing whether tracing is enabled or not. 049 */ 050 void setTracing(Boolean tracing); 051 052 /** 053 * Returns whether tracing enabled 054 * 055 * @return true if tracing is enabled 056 */ 057 boolean isTracing(); 058 059 /** 060 * Sets whether handle fault is enabled or not (default is disabled). 061 * <p/> 062 * Is disabled by default 063 * 064 * @param handleFault whether handle fault is enabled or not. 065 */ 066 void setHandleFault(Boolean handleFault); 067 068 /** 069 * Returns whether tracing enabled 070 * 071 * @return true if tracing is enabled 072 */ 073 boolean isHandleFault(); 074 075 /** 076 * Sets a delay value in millis that a message is delayed at every step it takes in the route path, 077 * to slow things down to better helps you to see what goes 078 * <p/> 079 * Is disabled by default 080 * 081 * @param delay delay in millis 082 */ 083 void setDelayer(long delay); 084 085 /** 086 * Gets the delay value 087 * 088 * @return delay in millis, or <tt>null</tt> if disabled 089 */ 090 Long getDelayer(); 091 092 }