junit.log4j
Class JUnitAppenderSingleton

java.lang.Object
  |
  +--junit.log4j.JUnitAppenderSingleton

public class JUnitAppenderSingleton
extends java.lang.Object

Singleton that distributes logging events to all registered logging listeners.

Created: Mon Nov 12 10:21:18 2001

Version:
$Revision: 1.2 $
Author:
Wolfgang Reissenberger

Constructor Summary
protected JUnitAppenderSingleton()
          Creates a new JUnitAppenderSingleton instance.
 
Method Summary
static void addListener(AppenderListener listener)
          Registers a TestListener.
protected static void addLoggingEvent(org.apache.log4j.spi.LoggingEvent event)
          Sends the event as formatted message to all logging listeners.
static java.util.LinkedList cloneListeners()
          Clone the current list of listeners.
protected static JUnitAppenderSingleton getInstance()
          Return the instance of this class.
static org.apache.log4j.Layout getLayout()
          Get the value of layout.
static void removeListener(AppenderListener listener)
          Unregisters a TestListener.
static void setLayout(org.apache.log4j.Layout v)
          Set the value of layout.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JUnitAppenderSingleton

protected JUnitAppenderSingleton()
Creates a new JUnitAppenderSingleton instance.
Method Detail

getInstance

protected static JUnitAppenderSingleton getInstance()
Return the instance of this class. If no instance is present, a new one will be instantiated first.
Returns:
a JUnitAppenderSingleton value

addLoggingEvent

protected static void addLoggingEvent(org.apache.log4j.spi.LoggingEvent event)
Sends the event as formatted message to all logging listeners.
Parameters:
event - a LoggingEvent value

getLayout

public static org.apache.log4j.Layout getLayout()
Get the value of layout.
Returns:
value of layout.

setLayout

public static void setLayout(org.apache.log4j.Layout v)
Set the value of layout.
Parameters:
v - Value to assign to layout.

addListener

public static void addListener(AppenderListener listener)
Registers a TestListener.
Parameters:
listener - an AppenderListener value

removeListener

public static void removeListener(AppenderListener listener)
Unregisters a TestListener.
Parameters:
listener - an AppenderListener value

cloneListeners

public static java.util.LinkedList cloneListeners()
Clone the current list of listeners.
Returns:
a LinkedList value


Copyright © 2000 -- 2003 openfuture.de. All Rights Reserved.