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

Package class diagram package TLEntityUpdater
java.lang.Object
  extended by javax.swing.SwingWorker<Boolean,Long>
      extended by cz.cuni.amis.nb.pogamut.unreal.timeline.records.TLEntityUpdater
All Implemented Interfaces:
Runnable, Future<Boolean>, RunnableFuture<Boolean>

public class TLEntityUpdater
extends SwingWorker<Boolean,Long>

This class is a Swing Thread Safe worker that retrieves info from introspection, puts it into respective properties (in worker thread) and updates end time (AWT).

The retrieval of introspection will continue as long as agent is in state IAgentStateUp.

Author:
Honza Havlicek

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
 
Field Summary
protected  cz.cuni.amis.pogamut.unreal.bot.IUnrealBot agent
           
protected  TLAgentEntity entity
           
protected  int interval
          How many ms should pass between consequent retrival from introspection.
 
Constructor Summary
TLEntityUpdater(TLAgentEntity entity, cz.cuni.amis.pogamut.unreal.bot.IUnrealBot agent)
           
 
Method Summary
protected  Boolean doInBackground()
           
protected  void done()
          When everything is done, notify
protected  void process(List<Long> endTimestamps)
           
protected  void syncFolder(cz.cuni.amis.introspection.Folder folder, TLFolder tlFolder, long time)
          Take the folder recursively traverse directory structure.
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entity

protected TLAgentEntity entity

agent

protected cz.cuni.amis.pogamut.unreal.bot.IUnrealBot agent

interval

protected int interval
How many ms should pass between consequent retrival from introspection. In ms, default 100 ms.

Constructor Detail

TLEntityUpdater

public TLEntityUpdater(TLAgentEntity entity,
                       cz.cuni.amis.pogamut.unreal.bot.IUnrealBot agent)
Method Detail

doInBackground

protected Boolean doInBackground()
                          throws Exception
Specified by:
doInBackground in class SwingWorker<Boolean,Long>
Throws:
Exception

done

protected void done()
When everything is done, notify

Overrides:
done in class SwingWorker<Boolean,Long>

process

protected void process(List<Long> endTimestamps)
Overrides:
process in class SwingWorker<Boolean,Long>

syncFolder

protected void syncFolder(cz.cuni.amis.introspection.Folder folder,
                          TLFolder tlFolder,
                          long time)
                   throws cz.cuni.amis.introspection.IntrospectionException
Take the folder recursively traverse directory structure. For each subfolder:


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