cz.cuni.amis.nb.pogamut.unreal.timeline.records
Class TLLogRecorder

Package class diagram package TLLogRecorder
java.lang.Object
  extended by cz.cuni.amis.nb.pogamut.unreal.timeline.records.TLLogRecorder
All Implemented Interfaces:
Serializable, Comparable

public class TLLogRecorder
extends Object
implements Comparable, Serializable

Class for recording all log events that will come from source log. It stores the messages and handles the dispatch events.

Author:
Honza
See Also:
Serialized Form

Nested Class Summary
static interface TLLogRecorder.TLLogRecorderListener
          Listener for new log messages.
 
Method Summary
 void addLogRecordListener(TLLogRecorder.TLLogRecorderListener listener)
           
protected  void addRecord(LogRecord record)
          Take new record, update last timestamp of entity and emit it to all listeners.
 int compareTo(Object o)
           
 TLEntity getEntity()
           
protected  HashSet<TLLogRecorder.TLLogRecorderListener> getListeners()
           
 LogEvents getLogEvents()
          Get all log events that were ever recorded/ing in this TLLogRecorder.
 MapEvents getMapEvents()
          Get all map events that were ever recorded/ing in this TLLogRecorder.
 List<MapEvent> getMapEvents(long time)
          Get all map events that were in progress at passed time.
 String getName()
           
 Logger getSourceLogger()
           
 void printInfo(PrintStream stream)
           
 void removeLogRecordListener(TLLogRecorder.TLLogRecorderListener listener)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getMapEvents

public List<MapEvent> getMapEvents(long time)
Get all map events that were in progress at passed time.

Parameters:
time - time from which we want map events
Returns:
Map events from time.

getName

public String getName()

getEntity

public TLEntity getEntity()

getSourceLogger

public Logger getSourceLogger()

addRecord

protected void addRecord(LogRecord record)
Take new record, update last timestamp of entity and emit it to all listeners.

Parameters:
record -

getListeners

protected HashSet<TLLogRecorder.TLLogRecorderListener> getListeners()
Returns:
the listeners

addLogRecordListener

public void addLogRecordListener(TLLogRecorder.TLLogRecorderListener listener)

removeLogRecordListener

public void removeLogRecordListener(TLLogRecorder.TLLogRecorderListener listener)

compareTo

public int compareTo(Object o)
Specified by:
compareTo in interface Comparable

printInfo

public void printInfo(PrintStream stream)

getMapEvents

public MapEvents getMapEvents()
Get all map events that were ever recorded/ing in this TLLogRecorder.

Returns:
All map events from this recorder.

getLogEvents

public LogEvents getLogEvents()
Get all log events that were ever recorded/ing in this TLLogRecorder.

Returns:
All log events from this recorder.


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.