}
}
// Check what kind of event it is and if we have some special rules
if (event instanceof ImageEvent && loadImages.get()) {
final ImageEvent e = (ImageEvent) event;
final InputStream is = SessionReplayImpl.this.loader.getFile(e.associatedFilename);
final BufferedImage read = ImageIO.read(is);
event = new PseudoImageEvent(e, read);
}
// Now we are permitted to fire the event.
try {
listener.nextEvent(event);
} catch (Exception e) {
e.printStackTrace();
}
previousEvent = event;
} catch (EOFException e) {
e.printStackTrace();
this.hasMore = false;
if (gettingMetaInfo.get()) {
realtimeDuration.set(currentEvenTime.get() - firstEventTime.get());
}
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
} finally {
SessionReplayImpl.this.finishedLock.unlock();
try {
barrier.await();
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (BrokenBarrierException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
});
t.setDaemon(true);
t.start();
// Synchronize with starting of thread.
try {
barrier.await();
} catch (final InterruptedException e) {
e.printStackTrace();
} catch (final BrokenBarrierException e) {
e.printStackTrace();
}
}