KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > log4j > spi > OptionHandler


1 /*
2  * Copyright 1999-2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.apache.log4j.spi;
18
19
20 /**
21    A string based interface to configure package components.
22
23    @author Ceki Gülcü
24    @author Anders Kristensen
25    @since 0.8.1
26  */

27 public interface OptionHandler {
28
29   /**
30      Activate the options that were previously set with calls to option
31      setters.
32
33      <p>This allows to defer activiation of the options until all
34      options have been set. This is required for components which have
35      related options that remain ambigous until all are set.
36
37      <p>For example, the FileAppender has the {@link
38      org.apache.log4j.FileAppender#setFile File} and {@link
39      org.apache.log4j.FileAppender#setAppend Append} options both of
40      which are ambigous until the other is also set. */

41   void activateOptions();
42
43   /**
44      Return list of strings that the OptionHandler instance recognizes.
45
46      @deprecated We now use JavaBeans style getters/setters.
47    */

48   // String[] getOptionStrings();
49

50   /**
51      Set <code>option</code> to <code>value</code>.
52
53      <p>The handling of each option depends on the OptionHandler
54      instance. Some options may become active immediately whereas
55      other may be activated only when {@link #activateOptions} is
56      called.
57
58      @deprecated We now use JavaBeans style getters/setters.
59   */

60   //void setOption(String option, String value);
61
}
62
Popular Tags