View Javadoc

1   package org.e2etrace.config;
2   
3   /*
4    * Copyright 2006 Gunther Popp
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  import org.e2etrace.trace.ITraceStepId;
20  
21  /**
22   * Default implementation of the e2etrace configuration.
23   * <p>
24   *
25   * This implementation returns the following default values for all
26   * configuration settings:
27   * <p>
28   * <ul>
29   * <li>isTraceEnabled: true</li>
30   * <li>isTraceEnabledForId: true, regardless of the supplied id</li>
31   * </ul>
32   * The default implementation is used by e2etrace if no explicit configuration
33   * is set by the user (see
34   * {@link org.e2etrace.trace.ITraceSessionManager#setConfig(ITraceConfig)}).
35   * <p>
36   *
37   * @author Gunther Popp
38   *
39   */
40  public class DefaultTraceConfig implements ITraceConfig {
41  
42    /**
43     * Default constructor.
44     * <p>
45     *
46     */
47    public DefaultTraceConfig() {
48  
49    }
50  
51    /** {@inheritDoc} */
52    public boolean isTraceEnabled() {
53      return true;
54    }
55  
56    /** {@inheritDoc} */
57    public boolean isTraceEnabledForId(ITraceStepId id) {
58      return true;
59    }
60  
61  }