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.
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 |
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 intoiPort
- port to listen on- Throws:
IOException
- if an error occurs- See Also:
ServerSocket
,
Thread.setDaemon(boolean)
,
Logger
,
SocketAppender
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()