final User user = (User) hSession.getAttribute(SessionAttribute.USER);
assert (user != null);
user.contactedServer();
while (!(user.hasQueuedMessages()) && System.nanoTime() - end < 0) {
try {
user.waitForNewMessageNotification(TimeUnit.NANOSECONDS.toMillis(end - System.nanoTime()));
} catch (final InterruptedException ie) {
// pass
}
}
if (user.hasQueuedMessages()) {