Log4j 0.9.1

org.log4j.spi
Interface OptionHandler

All Known Subinterfaces:
ErrorHandler
All Known Implementing Classes:
AppenderSkeleton, Filter, Layout, XCategory

public interface OptionHandler

A string based interface to configure package components.

Since:
0.8.1
Author:
Ceki Gülcü

Method Summary
 void activateOptions()
          Activate the options that were previously set with calls to setOption.
 String[] getOptionStrings()
          Return list of strings that the OptionHandler instance recognizes.
 void setOption(String option, String value)
          Set option to value.
 

Method Detail

activateOptions

public void activateOptions()
Activate the options that were previously set with calls to setOption.

This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.

For example, the FileAppender has the "File" and "Append" options both of which are ambigous until the other is also set.


getOptionStrings

public String[] getOptionStrings()
Return list of strings that the OptionHandler instance recognizes.

setOption

public void setOption(String option,
                      String value)
Set option to value.

The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when activateOptions() is called.


Log4j 0.9.1

Please notify me about new log4j releases.