{
bufferedReader.readLine(new AsyncCallback<String>()
{
public void onSuccess(String line)
{
NotificationRecord notification = null;
if(line != null)
{
//Notification record: sender,time,status,type,message
String[] record = line.split(",",5);
if(record == null || record.length < 5)
{
Log.error("Wrong notification format (ignored)! " + line );
}else
{
String sender = record[0];
String time = record[1];
String status = record[2];
String type = record[3];
String message = record[4];
notification = new NotificationRecord(sender,time,status,type,message);
notifications.add(notification);
}
// recurse
readNotificationRecords();