public void run(){
try {
try {
while(! closed){
try {
ModSecurityAuditEvent e = (ModSecurityAuditEvent) in.readObject();
if(e != null){
log.debug("received event-object!");
queue.add(e);
Iterator<AuditEventListener> l = listeners.iterator();
while(l.hasNext()){
l.next().eventArrived(e);
}
}
} catch (EOFException eof) {
//
// in case we are at the end of the stream, we simply have a little break.
//
Thread.sleep(256);
}
}
} catch (Exception ex) {
ex.printStackTrace();
}
in.close();
socket.close();
} catch (Exception e) {
e.printStackTrace();
}
}