in src/main/java/org/apache/log4j/receivers/net/UDPReceiver.java [200:247]
public void run() {
ArrayList list2 = new ArrayList();
while (!UDPReceiver.this.closed) {
synchronized (list) {
try {
while (!UDPReceiver.this.closed && list.size() == 0) {
list.wait(300);
}
if (list.size() > 0) {
list2.addAll(list);
list.clear();
}
} catch (InterruptedException ie) {
}
}
if (list2.size() > 0) {
Iterator iter = list2.iterator();
while (iter.hasNext()) {
String data = (String) iter.next();
List v = decoderImpl.decodeEvents(data);
if (v != null) {
Iterator eventIter = v.iterator();
while (eventIter.hasNext()) {
if (!isPaused()) {
doPost((LoggingEvent) eventIter.next());
}
}
}
}
list2.clear();
} else {
try {
synchronized (this) {
wait(1000);
}
} catch (InterruptedException ie) {
}
}
} // while
getLogger().debug(UDPReceiver.this.getName()+ "'s handler thread is exiting");
} // run