Class SwingTaskManager
java.lang.Object
uno.anahata.asi.agi.event.BasicPropertyChangeSource
uno.anahata.asi.swing.internal.SwingTaskManager
- All Implemented Interfaces:
PropertyChangeSource, Rebindable
A centralized registry for tracking active
SwingTask instances.
This manager provides real-time observability into background activities
initiated by the Swing UI. It allows components like the StatusPanel
to display progress and status messages for non-AI tasks (e.g., token
calculation, file system operations).
- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe thread-safe concurrent list tracking all uncompleted background actions.private static final SwingTaskManagerThe global singleton manager instance.Fields inherited from class BasicPropertyChangeSource
propertyChangeSupport -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePrivate constructor preventing instantiation from other packages. -
Method Summary
Modifier and TypeMethodDescriptionGets an unmodifiable list of currently active swing tasks.static SwingTaskManagerGets the singleton instance of the task manager.voidtaskFinished(SwingTask<?> task) Unregisters a task as finished.voidtaskStarted(SwingTask<?> task) Registers a task as started.Methods inherited from class BasicPropertyChangeSource
addPropertyChangeListener, addPropertyChangeListener, rebind, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PropertyChangeSource
getPropertyChangeSupport
-
Field Details
-
INSTANCE
The global singleton manager instance. -
activeTasks
-
-
Constructor Details
-
SwingTaskManager
private SwingTaskManager()Private constructor preventing instantiation from other packages.
-
-
Method Details
-
getInstance
Gets the singleton instance of the task manager.- Returns:
- The task manager instance.
-
taskStarted
Registers a task as started.- Parameters:
task- The task that started.
-
taskFinished
Unregisters a task as finished.- Parameters:
task- The task that finished.
-
getActiveTasks
-

