org.apache.avalon.logging.logkit
Class DefaultFormatterFactory

java.lang.Object
  extended byorg.apache.avalon.logging.logkit.DefaultFormatterFactory
All Implemented Interfaces:
FormatterFactory

public class DefaultFormatterFactory
extends Object
implements FormatterFactory

Factory for Formatter-s.


Field Summary
 
Fields inherited from interface org.apache.avalon.logging.logkit.FormatterFactory
DEFAULT_FORMAT
 
Constructor Summary
DefaultFormatterFactory()
           
 
Method Summary
 Formatter createFormatter(Configuration config)
          Creation of a new formatter using a supplied configuration.
 Formatter createFormatter(String type, String format)
          Creation of a new formatter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultFormatterFactory

public DefaultFormatterFactory()
Method Detail

createFormatter

public Formatter createFormatter(Configuration config)
Creation of a new formatter using a supplied configuration.

Specified by:
createFormatter in interface FormatterFactory
Parameters:
config - the formatter configuration
Returns:
the formatter instance
Throws:
IllegalArgumentException - if the formatter type is unknown

createFormatter

public Formatter createFormatter(String type,
                                 String format)
Creation of a new formatter.

Specified by:
createFormatter in interface FormatterFactory
Parameters:
type - the formatter type identifier
format - the format specification
Returns:
the formatter instance
Throws:
IllegalArgumentException - if the formatter type is unknown


Copyright © The Apache Software Foundation. All Rights Reserved.