Package org.apache.log4j.net
Class SocketHubAppender.ServerMonitor
- java.lang.Object
-
- org.apache.log4j.net.SocketHubAppender.ServerMonitor
-
- All Implemented Interfaces:
java.lang.Runnable
- Enclosing class:
- SocketHubAppender
private class SocketHubAppender.ServerMonitor extends java.lang.Object implements java.lang.Runnable
This class is used internally to monitor a ServerSocket and register new connections in a vector passed in the constructor.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
keepRunning
private java.lang.Thread
monitorThread
private java.util.Vector
oosList
private int
port
-
Constructor Summary
Constructors Constructor Description ServerMonitor(int _port, java.util.Vector _oosList)
Create a thread and start the monitor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
Method that runs, monitoring the ServerSocket and adding connections as they connect to the socket.private void
sendCachedEvents(java.io.ObjectOutputStream stream)
void
stopMonitor()
Stops the monitor.
-
-
-
Method Detail
-
stopMonitor
public void stopMonitor()
Stops the monitor. This method will not return until the thread has finished executing.
-
sendCachedEvents
private void sendCachedEvents(java.io.ObjectOutputStream stream) throws java.io.IOException
- Throws:
java.io.IOException
-
run
public void run()
Method that runs, monitoring the ServerSocket and adding connections as they connect to the socket.- Specified by:
run
in interfacejava.lang.Runnable
-
-