cz.cuni.amis.nb.pogamut.unreal.timeline.records
Class TLEntityUpdater
java.lang.Object
javax.swing.SwingWorker<Boolean,Long>
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
|
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. |
|
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 |
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.
TLEntityUpdater
public TLEntityUpdater(TLAgentEntity entity,
cz.cuni.amis.pogamut.unreal.bot.IUnrealBot agent)
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:
- sync properties - add previously missing to
TLFolder
- synch values of properties - put current value of
introspection properties to TLProperties
- synch subfolders, if some subfolder is missing, create it.
- Parameters:
folder - tlFolder - time -
- Throws:
cz.cuni.amis.introspection.IntrospectionException
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.