org.apache.avalon.excalibur.logger.factory
Class AsyncLogTargetFactory

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
          extended byorg.apache.avalon.excalibur.logger.factory.AsyncLogTargetFactory
All Implemented Interfaces:
Configurable, Contextualizable, LogEnabled, LogTargetFactory, LogTargetFactoryManageable

public final class AsyncLogTargetFactory
extends AbstractTargetFactory
implements LogTargetFactoryManageable

AsyncLogTargetFactory class. This factory creates LogTargets with a wrapped AsyncLogTarget around it:


 <async-target id="target-id" queue-size=".." priority="MIN|NORM|MAX|n">
  <any-target-definition/>
 </async-target>

 

This factory creates a AsyncLogTarget object with a specified queue-size attribute (which defaults to what the AsyncLogTarget uses if absent). The LogTarget to wrap is described in a child element of the configuration (in the sample above named as <any-target-definition/>). The Thread of the created AsyncLogTarget will have a priority specified by the priotity attribute (which defaults to Thread.MIN_PRIORITY). The priority values corresponds to those defined in the Thread class which are:

MIN=Thread.MIN_PRIORITY
NORM=Thread.NORM_PRIORITY
MAX=Thread.MAX_PRIORITY
number=priority number (see class java.lang.Thread)

Since:
4.0
Version:
CVS $Revision: 1.8 $ $Date: 2004/03/10 13:54:50 $
Author:
Avalon Development Team

Field Summary
protected  LogTargetFactoryManager m_logTargetFactoryManager
          The LogTargetFactoryManager
 
Fields inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
m_configuration, m_context
 
Constructor Summary
AsyncLogTargetFactory()
           
 
Method Summary
 LogTarget createTarget(Configuration configuration)
          create a LogTarget based on a Configuration
 void setLogTargetFactoryManager(LogTargetFactoryManager logTargetFactoryManager)
          get the LogTargetFactoryManager
 
Methods inherited from class org.apache.avalon.excalibur.logger.factory.AbstractTargetFactory
configure, contextualize
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_logTargetFactoryManager

protected LogTargetFactoryManager m_logTargetFactoryManager
The LogTargetFactoryManager

Constructor Detail

AsyncLogTargetFactory

public AsyncLogTargetFactory()
Method Detail

createTarget

public final LogTarget createTarget(Configuration configuration)
                             throws ConfigurationException
create a LogTarget based on a Configuration

Specified by:
createTarget in interface LogTargetFactory
Throws:
ConfigurationException

setLogTargetFactoryManager

public final void setLogTargetFactoryManager(LogTargetFactoryManager logTargetFactoryManager)
get the LogTargetFactoryManager

Specified by:
setLogTargetFactoryManager in interface LogTargetFactoryManageable


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.