Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junit.log4j
Class JUnitAppenderSingleton  view JUnitAppenderSingleton download JUnitAppenderSingleton.java

java.lang.Object
  extended byjunit.log4j.JUnitAppenderSingleton

public class JUnitAppenderSingleton
extends java.lang.Object

Singleton that distributes logging events 55 to all registered logging listeners.

Created: Mon Nov 12 10:21:18 2001

Version:
$Revision: 1.2 $

Field Summary
private static JUnitAppenderSingleton instance
           
private static org.apache.log4j.Layout layout
           
private static java.util.LinkedList listeners
           
 
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 55 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
 

Field Detail

instance

private static JUnitAppenderSingleton instance

layout

private static org.apache.log4j.Layout layout

listeners

private static java.util.LinkedList listeners
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.


addLoggingEvent

protected static void addLoggingEvent(org.apache.log4j.spi.LoggingEvent event)
Sends the event as formatted message 55 to all logging listeners.


getLayout

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


setLayout

public static void setLayout(org.apache.log4j.Layout v)
Set the value of layout.


addListener

public static void addListener(AppenderListener listener)
Registers a TestListener.


removeListener

public static void removeListener(AppenderListener listener)
Unregisters a TestListener.


cloneListeners

public static java.util.LinkedList cloneListeners()
Clone the current list of listeners.