Logback API
Version 0.9.8

ch.qos.logback.core.joran.action
Class Action

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.core.joran.action.Action
All Implemented Interfaces:
ContextAware
Direct Known Subclasses:
AbstractEventEvaluatorAction, AbstractLayoutAction, AppenderAction, AppenderRefAction, BindDataSourceToJNDIAction, ConfigurationAction, ConfigurationAction, ConsolePluginAction, ConversionRuleAction, ImplicitAction, IncludeAction, JMXConfiguratorAction, LevelAction, LoggerAction, MatcherAction, NewRuleAction, NOPAction, ParamAction, PropertyAction, RootLoggerAction

public abstract class Action
extends ContextAwareBase

Most of the work for configuring log4j is done by Actions. Methods of an Action are invoked while an XML file is parsed through. This class is largely copied from the relevant class in the commons-digester project of the Apache Software Foundation.

Author:
Craig McClanahan, Christopher Lenz, Ceki Gülcü

Field Summary
static String ACTION_CLASS_ATTRIBUTE
           
static String CLASS_ATTRIBUTE
           
static String FILE_ATTRIBUTE
           
static String NAME_ATTRIBUTE
           
static String PATTERN_ATTRIBUTE
           
static String VALUE_ATTRIBUTE
           
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
Action()
           
 
Method Summary
abstract  void begin(InterpretationContext ec, String name, Attributes attributes)
          Called when the parser first encounters an element.
 void body(InterpretationContext ec, String body)
           
abstract  void end(InterpretationContext ec, String name)
           
protected  int getColumnNumber(InterpretationContext ec)
           
protected  int getLineNumber(InterpretationContext ec)
           
 String toString()
           
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NAME_ATTRIBUTE

public static final String NAME_ATTRIBUTE
See Also:
Constant Field Values

VALUE_ATTRIBUTE

public static final String VALUE_ATTRIBUTE
See Also:
Constant Field Values

FILE_ATTRIBUTE

public static final String FILE_ATTRIBUTE
See Also:
Constant Field Values

CLASS_ATTRIBUTE

public static final String CLASS_ATTRIBUTE
See Also:
Constant Field Values

PATTERN_ATTRIBUTE

public static final String PATTERN_ATTRIBUTE
See Also:
Constant Field Values

ACTION_CLASS_ATTRIBUTE

public static final String ACTION_CLASS_ATTRIBUTE
See Also:
Constant Field Values
Constructor Detail

Action

public Action()
Method Detail

begin

public abstract void begin(InterpretationContext ec,
                           String name,
                           Attributes attributes)
                    throws ActionException
Called when the parser first encounters an element. The return value indicates whether child elements should be processed. If the returned value is 'false', then child elements are ignored.

Throws:
ActionException

body

public void body(InterpretationContext ec,
                 String body)
          throws ActionException
Throws:
ActionException

end

public abstract void end(InterpretationContext ec,
                         String name)
                  throws ActionException
Throws:
ActionException

toString

public String toString()
Overrides:
toString in class Object

getColumnNumber

protected int getColumnNumber(InterpretationContext ec)

getLineNumber

protected int getLineNumber(InterpretationContext ec)

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.