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
018package org.apache.log4j.spi;
019
020
021/**
022   A string based interface to configure package components.
023
024   @author Ceki Gülcü
025   @author Anders Kristensen
026   @since 0.8.1
027 */
028public interface OptionHandler {
029
030  /**
031     Activate the options that were previously set with calls to option
032     setters.
033
034     <p>This allows to defer activiation of the options until all
035     options have been set. This is required for components which have
036     related options that remain ambigous until all are set.
037
038     <p>For example, the FileAppender has the {@link
039     org.apache.log4j.FileAppender#setFile File} and {@link
040     org.apache.log4j.FileAppender#setAppend Append} options both of
041     which are ambigous until the other is also set.  */
042  void activateOptions();
043
044  /**
045     Return list of strings that the OptionHandler instance recognizes.
046
047     @deprecated We now use JavaBeans style getters/setters.
048   */
049  //  String[] getOptionStrings();
050
051  /**
052     Set <code>option</code> to <code>value</code>.
053
054     <p>The handling of each option depends on the OptionHandler
055     instance. Some options may become active immediately whereas
056     other may be activated only when {@link #activateOptions} is
057     called.
058
059     @deprecated We now use JavaBeans style getters/setters.
060  */
061  //void setOption(String option, String value);
062}