Log4JMonitor v1.1

org.alltimeflashdreamer.log4jmonitor
Class LoggingReceiver

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--org.alltimeflashdreamer.log4jmonitor.LoggingReceiver
All Implemented Interfaces:
Runnable

class LoggingReceiver
extends Thread

Title: LoggingReceiver
Description: Represents a daemon thread that processes connections from a org.apache.log4j.net.SocketAppender. The Log4J messages created by this class itself are sent to the (own) thread too.
This code has been copied from the authors below.


Fields inherited from class java.lang.Thread
inheritableThreadLocals, MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY, threadLocals
 
Constructor Summary
(package private) LoggingReceiver(MyTableModel model, int iPort)
          Creates a new LoggingReceiver instance.
 
Method Summary
protected  void finalize()
          Override of Object's finalize method to shut down the Log4J Logger.
 void run()
          Listens for client connections.
 
Methods inherited from class java.lang.Thread
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoggingReceiver

LoggingReceiver(MyTableModel model,
                int iPort)
          throws IOException
Creates a new LoggingReceiver instance. The new instance appends its own Logger as a SocketAppender on the localhost, allowing it to log its own messages to the same output window.
Parameters:
model - model to place put received into
iPort - port to listen on
Throws:
IOException - if an error occurs
See Also:
ServerSocket, Thread.setDaemon(boolean), Logger, SocketAppender
Method Detail

run

public void run()
Listens for client connections. If a new one is accepted, a new Thread is started which listens to this client.
Overrides:
run in class Thread
See Also:
ServerSocket.accept(), Thread

finalize

protected void finalize()
                 throws Throwable
Override of Object's finalize method to shut down the Log4J Logger.
Overrides:
finalize in class Object
Throws:
Throwable - as defined in the superclass
See Also:
Object.finalize()

Copyright (c) 1999/2000 by apache.org, 2001/02 by Sven Mosimann, Adrian Seiler and Florian Steinsiepe