de.fhg.igd.logging.log4j
Class AsynchronousWriterAppender.Log4jMessageDispatcher

java.lang.Object
  extended byjava.lang.Thread
      extended byde.fhg.igd.logging.AbstractAsynchronousMessageDispatcher
          extended byde.fhg.igd.logging.log4j.AsynchronousWriterAppender.Log4jMessageDispatcher
All Implemented Interfaces:
Runnable
Enclosing class:
AsynchronousWriterAppender

private static class AsynchronousWriterAppender.Log4jMessageDispatcher
extends AbstractAsynchronousMessageDispatcher

This is the dispatcher implementation for the Log4J logging mechanism.


Field Summary
 
Fields inherited from class de.fhg.igd.logging.AbstractAsynchronousMessageDispatcher
fifo_, finished_, lost_, maxbuf_, messenger_, notified_
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
AsynchronousWriterAppender.Log4jMessageDispatcher(Messenger messenger, int maxbuf)
           
 
Method Summary
protected  Object createLossEntry(int lost, Object ref)
          Create a notification log entry informing about lost messages.
protected  void printLossMessage(Object ref)
          Print a notification about automatic message discarding to System.out.
 String toString()
           
 
Methods inherited from class de.fhg.igd.logging.AbstractAsynchronousMessageDispatcher
dispatch, finish, run
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AsynchronousWriterAppender.Log4jMessageDispatcher

public AsynchronousWriterAppender.Log4jMessageDispatcher(Messenger messenger,
                                                         int maxbuf)
Method Detail

printLossMessage

protected void printLossMessage(Object ref)
Description copied from class: AbstractAsynchronousMessageDispatcher
Print a notification about automatic message discarding to System.out.

Specified by:
printLossMessage in class AbstractAsynchronousMessageDispatcher
Parameters:
ref - The message to refer to and get information from

createLossEntry

protected Object createLossEntry(int lost,
                                 Object ref)
Description copied from class: AbstractAsynchronousMessageDispatcher
Create a notification log entry informing about lost messages.

Specified by:
createLossEntry in class AbstractAsynchronousMessageDispatcher
Parameters:
lost - The number of lost messages
ref - The message to refer to and get information from
Returns:
The notification message object

toString

public String toString()
Overrides:
toString in class AbstractAsynchronousMessageDispatcher


Copyright © Fraunhofer Gesellschaft. All Rights Reserved.